to many "IF" statements......

mnmhenry

Board Regular
Joined
Mar 28, 2002
Messages
167
Hi guys
I have 9 dates in AA1:AI1

When I have a date in AA1 i want C1 to read "1"
When I have two dates AA1 & AB1 I want C1 to read "2"
When I have three dates in AA1, AB1 & AC1 I want C1 to read "3"
....and so on

In cell C1 I am using
=if(AA1<>0,("1"),if(AB1<>0,("2"),if(AC1<>0,("3"))))
...but by the time I get to an "if" for AI1, its telling my I have too many arguments. Can anyone help me shorten this do do what I want to do ??

Thanks heaps,
Mark
(y)
 

Some videos you may like

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

mnmhenry

Board Regular
Joined
Mar 28, 2002
Messages
167
Ggeeeezzzzzz

whats the old saying.... Stand back and look outside the square your in ??

Didnt even give that a thought. the weekend must have been good.


thanks. :ROFLMAO:
 

Watch MrExcel Video

Forum statistics

Threads
1,122,694
Messages
5,597,571
Members
414,156
Latest member
WDMix

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
Top