Request for help with a function

  • Thread starter Thread starter Carrie-Louise
  • Start date Start date
C

Carrie-Louise

I have the following simplified table in Excel

Revenue Month
10,000 January
5,000 February
1,000 January
10,000 March
6,000 February
15,000 January

I want to be able to add the revenue for a particular
month and have the result in a cell.

I have tried using Vlookup and IF with no joy:
IF(C4:C9="January",add the corresponding value from
B4:B9,0)

Can you help me?
 
Hi

Is the table you did give us the one where you want to get the revenue
values into?

Somewhere (it can be on different worksheet, p.e. Revenues!A2:B11) create a
lookup table (NB! Month first!)
Month Revenue
where you list all 12 months with according revenues (the order isn't
essential, but it'll look nicer when ordered by month).

Now your formula for cell B4 will be
=VLOOKUP(C4,Revenues!$A$2:$B$12,2,FALSE)
copy it into range B4:B9

When you define a named range p.e. Revenues=Revenues!$A$2:$B$12, the the
formula will be even more simple
=VLOOKUP(C4,Revenues,2,FALSE)
 
One not very god way would be to put the Month in column A and the revenue
in column B and use the formula


=IF(A5=D5,B5,0)+IF(A6=D5,B6,0)+IF(A7=D5,B7,0)+IF(A8=D5,B8,0)+IF(A9=D5,B9,0)+
IF(A10=D5,B10,0) etc

Alan Cocks
 
With your data below in A1:B7 in Cell D1 (for Now Type in "February", for
example...)
In cell D2 enter: =SUMIF(B2:B7,D1,A2:A7) Change D1 to your choice
of Month Names..
HTH
 
Back
Top