HELP-HELP-HELP

P

Phil

I have a sample of the table that I working on as showing below:
Name Date Amount January February ....
Un Nyobe January-08 $56.00
Kwame Krumah June-08 12.00

I would like excel to return amount entered in the "amount column" in a
specific month if the date is within that month. For example, in the month of
January, please entered $56 if the date is anywhere between January 1 thru
31, 2008
 
R

RagDyer

Assuming month names in column headers D to O are text, and dates in Column
B are "legal" XL dates, try this in D2:

=IF($B2,IF(TEXT($B2,"mmmm")=D$1,$C2,""),"")

Copy across to Column O (December),
Then copy the range D2:O2 down as far as needed.
 
T

TomPl

If you put an date, not the name of the month, in the column heading, then
you could use this formula:
=IF(MONTH(D$2)=MONTH($B3),IF(YEAR(D$2)=YEAR($B3),$C3,""),"")
 
P

Phil

I Don't know if I have made myself clair.

I was able to build the following formula

=IF(E18>DATE(2008,4,30),IF(E18<=DATE(2008,5,31),F18),"").

The above is close to what I wanted, meaning if the date in E18, column K
is greater than April 04, 2008, if at the same time date in the same row is
also equal or less than May 05, 2008, display the value in F18, otherwise
leave the cell blank.
HOWEVER, THE FORMULA ABOVE IS NOT WORKING AS I WANTED TO. INSTEAD OF
DISPLAYING A BLANK CELL, IT DISPLAYS "FALSE".
--
Phil


RagDyer said:
Assuming month names in column headers D to O are text, and dates in Column
B are "legal" XL dates, try this in D2:

=IF($B2,IF(TEXT($B2,"mmmm")=D$1,$C2,""),"")

Copy across to Column O (December),
Then copy the range D2:O2 down as far as needed.
 
J

Jim Thomlinson

Did you try RagDyer's formula. It looks to me like it will do exactly what
you have asked for.
--
HTH...

Jim Thomlinson


Phil said:
I Don't know if I have made myself clair.

I was able to build the following formula

=IF(E18>DATE(2008,4,30),IF(E18<=DATE(2008,5,31),F18),"").

The above is close to what I wanted, meaning if the date in E18, column K
is greater than April 04, 2008, if at the same time date in the same row is
also equal or less than May 05, 2008, display the value in F18, otherwise
leave the cell blank.
HOWEVER, THE FORMULA ABOVE IS NOT WORKING AS I WANTED TO. INSTEAD OF
DISPLAYING A BLANK CELL, IT DISPLAYS "FALSE".
 
P

Phil

NOT WORKING.
I don't know what Column()-3 stands for? It is returning large number as
refer to the data below:

Input Date Amount January February
January-08 $56.00
March-08 70.00
June-08 12.00 $39,606.00

Thanks for your help.
 
P

Pete_UK

To avoid the FALSE return, you need to move your bracket:

=IF(E18>DATE(2008,4,30),IF(E18<=DATE(2008,5,31),F18,""))

Or you could write this with one IF as:

=IF(AND(E18>DATE(2008,4,30),E18<=DATE(2008,5,31)),F18,"")

Hope this helps.

Pete
 
P

Pete_UK

That large number looks like a date which is formatted as currency.
Perhaps your cell references do not co-incide with the formula - what
do you have in C2?

Pete
 
P

Phil

Date
--
Phil


Pete_UK said:
That large number looks like a date which is formatted as currency.
Perhaps your cell references do not co-incide with the formula - what
do you have in C2?

Pete
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top