date format to use month in an argument

  • Thread starter Thread starter davidbrowne17
  • Start date Start date
D

davidbrowne17

ok here goes....

A1 = date entered by user i.e 1/10/04
B1 = A1, & formatted to shown just the month i.e "OCT"

Now how can the result from B1 be used in a formular depandant on th
month name i.e =IF( B1="OCT", "YES","NO)

The formular i will be using is =SUMPRODUCT, if that makes an
diffrence but the idear is just the same.

any help much apreciated.

Davi
 
One way:

=SUMPRODUCT(--(TEXT(B1:B10,"mmm") = "Oct"),C1:C10, D1:D10)

but it's more efficient to use:

=SUMPRODUCT(--(MONTH(B1:B10)=10),C1:C10,D1:D10)
 
Do you really need the name of the month?

You can bypass the need of using the extra cell B1 with formulas similar to:

=IF(MONTH(A1)=10,"YES","NO")

If you do want to use the name, try this:


=IF(TEXT(B1,"mmm")="OCT","YES","NO")
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


message
ok here goes....

A1 = date entered by user i.e 1/10/04
B1 = A1, & formatted to shown just the month i.e "OCT"

Now how can the result from B1 be used in a formular depandant on the
month name i.e =IF( B1="OCT", "YES","NO)

The formular i will be using is =SUMPRODUCT, if that makes any
diffrence but the idear is just the same.

any help much apreciated.

David
 

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

Back
Top