return a cell value from multiple ifs

splash

Board Regular
Joined
Oct 12, 2004
Messages
74
Hi all

Can you offer assistance?

I'm trying to return a value from a cell but the multiple ifs required exceed the limit in the formula bar.

Essentially, in the example below:

Budget May-11 Jun-11 Jul-11 Aug-11

3.0% 3.0% 3.0%
3.0% 3.0%
3.0%

Column A needs to return the date from Row 1 when the 1st in a sequence of numbers appears on each particular row. So in the example above, Row 2 (cell A2) would return May-11, Row 3 (cell A3) would return Jun-11, Row 4 (A4) Jul-11, Row 4 (A5) would return "N/A" if no figures appear.

The multiple if function that I am trying to run seems to only be able to cope with 8 or so arguments (=IF(A2>0,A$1,if(B2>0,B$1,if(C2>0,C$1,if(D2>0,D$1,if(E2>0,E$1,...),"N/A"))

Any advice extremely gratefully received
Thanks in advance
Splash
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hi all

Can you offer assistance?

I'm trying to return a value from a cell but the multiple ifs required exceed the limit in the formula bar.

Essentially, in the example below:

Budget May-11 Jun-11 Jul-11 Aug-11

3.0% 3.0% 3.0%
3.0% 3.0%
3.0%

Column A needs to return the date from Row 1 when the 1st in a sequence of numbers appears on each particular row. So in the example above, Row 2 (cell A2) would return May-11, Row 3 (cell A3) would return Jun-11, Row 4 (A4) Jul-11, Row 4 (A5) would return "N/A" if no figures appear.

The multiple if function that I am trying to run seems to only be able to cope with 8 or so arguments (=IF(A2>0,A$1,if(B2>0,B$1,if(C2>0,C$1,if(D2>0,D$1,if(E2>0,E$1,...),"N/A"))

Any advice extremely gratefully received
Thanks in advance
Splash
Try this...

Book1
ABCDE
1_May-11Jun-11Jul-11Aug-11
2May-11551114_
3Jun-11_855_
4Jul-11__88_
5#N/A____
Sheet1

This array formula** entered in A2 and copied down:

=INDEX(B$1:E$1,MATCH(TRUE,ISNUMBER(B2:E2),0))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.

Format in the Date style of your choice.
 
Upvote 0
Much obliged for your speedy reply

This option seems to do the trick, one quick follow up question... once the formula has been input as an array and copied into the relevant cells is there an easy means to update all the formulas other than updating each cell individually with Ctrl, Shift and Enter?

Once again thanks in advance
Splash
 
Upvote 0
Much obliged for your speedy reply

This option seems to do the trick, one quick follow up question... once the formula has been input as an array and copied into the relevant cells is there an easy means to update all the formulas other than updating each cell individually with Ctrl, Shift and Enter?

Once again thanks in advance
Splash
That sounds like you have calculation set to manual.

Make sure calculation is set to automatic.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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