This possible? (if statement problem)

Kerkain

New Member
Joined
May 4, 2006
Messages
12
Cells A2:A13 are the names of the month. Cells B2:B13 are the amount of weeks I can get paid in that month.

I want cell A1 to show a formula thats basically: if the current month is equal to a month in A2:A13 then display the number that corresponds with the month in B2:B13.

Suggestions?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
It's going to depend on exactly what is in A2:A13..
Jan Feb
Or
January February
Or
1/1/2011
2/1/2011
3/1/2011
etc...


If you have TEXT strings January February etc in A2:A13, then try

=VLOOKUP(TEXT(TODAY(),"mmmm"),A2:B13,2,FALSE)


Hope that helps.
 
Upvote 0
@jonmo1: The vlookup formula worked perfectly, far as I can tell at least.

@jeffreybrown and @njimack: When I put in your guys' formulas I got an error. In all honesty, I haven't ever made formulas like that either so I don't even know how to change them, lol.

Thanks for the help guys, I appreciate it!
 
Upvote 0
Glad to help...

Come to think of it though, I way over complicated it..
If your months are in chronological order...
A2 = January
A3 = February
A4 = March
etc..

Then you can just index column b using the month number..
Don't need to refer to column A.

=INDEX(B2:B13,MONTH(TODAY()))
 
Upvote 0
That works. I'll use both heheh.

Time for some more research though so I can better understand that formula too.

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,259
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top