IF Statement for various options

HandyAndy

New Member
Joined
Oct 2, 2013
Messages
13
Hi again everyone.
I have a situation of Sheet 1, has cells C29, E29, J29 and O29.
C29 is a drop down of office locations, say for example "Mumbai"
E29 is also a list of office locations, say for example "London"
J29 is also a list of office locations, say for example "New York"
O29 same again, office location is say "Houston".
In all cases above, in the drop down list, there is an option to select "None".

On Sheet 2, l want to show that if Sheet 1 C29 equals anything other than "None", return a value of 1 but if Sheet 1 E29 equals anything other than "None", return a value of 2.
And if Sheet 1 J29 equals anything other than "None", return a value of 3 and finally O29 equals anything other than "None" return a value of 4.
Essentially it is a count of which cells have a value other than "None".
It is not likely that C29 will show "Mumbai",E29 will show "None" and J29 will show "New York" and O29 will show "Houston". The expectation is the options will be selected in
sequence if that is relevant, such as C29 will show "Mumbai", E29 will show "London" and J29 and O29 will show "None".

Thanks in advance and l hope everyone has a great day!!
HandyAndy
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
does this work for you
=IF(C29<>"none",1,IF(E29<>"none",2,IF(J29<>"none",3,IF(O29<>"none",4,""))))

Not sure what version of Excel you have , a IFS() may work
=IFS(C29<>"none",1,E29<>"none",2,J29<>"none",3,O29<>"none",4)
 
Upvote 0
Solution

Forum statistics

Threads
1,214,824
Messages
6,121,783
Members
449,049
Latest member
greyangel23

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