=if(month(o5)=4,z5,"whatgoeshere")
> I have a large spreadsheet, which is all the sales in my company on a
> daily basis.
[quoted text clipped - 12 lines]
>
> TIA

Signature
Dave Peterson
Sandy Mann - 03 Jan 2006 18:27 GMT
> =if(month(o5)=4,z5,"whatgoeshere")
Being picky here, but won't that, (when used for Month 1) return Z5 even for
blank cells?
Better to use something like:
=IF(AND(O5<>"",MONTH(O5)=1),Z5,"whatgoeshere")
(Ok I'll get back to looking at the code you so helpfully posted for me <g>)

Signature
Regards
Sandy
sandymann2@mailinator.com
Replace@mailinator.com with @tiscali.co.uk
> =if(month(o5)=4,z5,"whatgoeshere")
>
[quoted text clipped - 14 lines]
>>
>> TIA
gb - 03 Jan 2006 18:48 GMT
GR8 that works fine.
The only other problem I have got now , is that the date cell,
sometimes contains a piece of text 'unsold'
This then throws up a #VALUE! error
If the formulae comes across this piece of text, then the cell should
then equate to 0
So how can I incorporate this problem into the IF statement.
>=if(month(o5)=4,z5,"whatgoeshere")
Peo Sjoblom - 03 Jan 2006 19:03 GMT
=IF(AND(ISNUMBER(O5),MONTH(O5)=4),Z5,0)

Signature
Regards,
Peo Sjoblom
> GR8 that works fine.
>
[quoted text clipped - 9 lines]
>
> >=if(month(o5)=4,z5,"whatgoeshere")
gb - 03 Jan 2006 19:26 GMT
Cannot get that to work.
Maybe its because cell O5 is a date and not a number ???
I'm not sure.
>=IF(AND(ISNUMBER(O5),MONTH(O5)=4),Z5,0)
Peo Sjoblom - 03 Jan 2006 19:54 GMT
Either your date is not a date that excel recognizes (meaning it is text) or
if it's a date then it's not April
Excel dates are numbers where one day is 1 and counting from Jan 0 1900
meaning that today is 38720
put 38720 in a cell, then format the cell as a date

Signature
Regards,
Peo Sjoblom
> Cannot get that to work.
>
[quoted text clipped - 3 lines]
>
> >=IF(AND(ISNUMBER(O5),MONTH(O5)=4),Z5,0)
Dave Peterson - 03 Jan 2006 19:59 GMT
Dates are just numbers to excel.
Maybe this:
=IF(ISNUMBER(O5)=FALSE,0,IF(MONTH(O5)=4,Z5,0))
or
=IF(NOT(ISNUMBER(O5)),0,IF(MONTH(O5)=4,Z5,0))
> Cannot get that to work.
>
[quoted text clipped - 3 lines]
>
> >=IF(AND(ISNUMBER(O5),MONTH(O5)=4),Z5,0)

Signature
Dave Peterson
You might consider using the AutoFilter to filter and display all of the
sales for the month of April, then using the =SUBTOTAL(9,Z:Z) formula to get
the total sales for that month. This way you could also actually "see" all
the April sales and could maybe decern other interesting info besides just
the total sales.
Vaya con Dios,
Chuck, CABGx3
> I have a large spreadsheet, which is all the sales in my company on a
> daily basis.
[quoted text clipped - 12 lines]
>
> TIA