Excel/Excel Formulas

Question
Dear Sir
I have tow excel sheet,I want to import some data sheet 01st to 2nd
01 sheet

DATE          CODE          DEBIT       CREDIT

01.01.2013
02.01.2013   LMCD       3,548.50
02.01.2013   CSAL       314.00
03.01.2013   CSAL       2,155.75
03.01.2013   DEBT       3,440.00
05.01.2013   CSAL       5,905.00
05.01.2013   TLON       4,000.00
05.01.2013   MICM       3,200.00
06.02.2013   CSAL       2,675.00
07.02.2013   CSAL       1,388.50
08.02.2013   TLON          115,000.00
08.02.2013   CSAL       5,543.00

I WANT TO IMPORT AS PER ABOVE DETAIL BELOW 2ND SHEET

A     B
CODE   Jan-13   Feb-13

CSAL
DEBT
TLON
TRSF
SUSP
MICM
WLFR
INWR
LMCD
PMCD

PLS HELP ME

kapila,

Assume the sheet with the data is named Data

in the second sheet you show A and B but it appears that Jan-13 is in column B and Feb-13 is in column C

I assume you want to add up all the credits for a specific code in a specific month and subtract all the debits from that total for the same specific code and specific month.

I will assume you data in the first sheet goes down to row 1000 - you can adjust that in the formula.

so assuming CSAL is in A2 in C2 put in

=Sumproduct(--(month(Data!\$A\$2:\$A\$1000)=Month(B\$1)),--(Data!\$B\$2:\$B\$1000=\$A2),Data!\$C\$2:\$C\$1000))-Sumproduct(--(month(Data!\$A\$2:\$A\$1000)=Month(B\$1)),--(Data!\$B\$2:\$B\$1000=\$A2),Data!\$D\$2:\$D\$1000))

Now select C2 and drag fill it down column C next to your data in columns A and B.

--
Regards,
Tom Ogilvy

This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Tom Ogilvy

Expertise

Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]

Experience

Extensive experience.

Education/Credentials
Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.