Nested If statement...

jay_dudley

New Member
Joined
Jun 17, 2011
Messages
39
Ladies and Gentlemen,
I have a spreadsheet with 16 columns and a variable number of rows of data. Basically we are using this as a log, to log when a "job" is recieved into our company, and then as it travels through the different departments it is signed off in the log, so for example columns 1-7 have typical job information, and the last 9 columns are the different departments. I am writing a macro to create an, "executive summary" tab which basically lists all of the unclosed jobs, and what departments have not signed off on these jobs. I've got everything working well EXCEPT determining the "waiting on" column. Currently im using a nested If statement. Problem is, the way the job flows through the departments IS NOT linear, and there could be multiple departments who havent signed off , or just one (the column headers are the dept. names and when the dept. signs off on the job they just write their initials and date in the corresponding cell below). im having a very difficult time creating a formula or writing VBA to return the departments that havent yet signed off on these particular jobs.

This is what my formula looks like so sar.
=IF(Z400="",IF(X400="",IF(V400="",IF(T400="",IF(R400="",IF(P400="",IF(N400="","Planning, Purchasing,Nest","Planning, Purchasing"),"Planning, Purchasing"),"Planning, Purchasing"),"Planning, Purchasing"),IF(V400="","purchasing",IF(T400="","purchasing",IF(R400="","purchasing",IF(P400="","purchasing",IF(N400="","nest","in copy"))))))))

but that is not working at all, i thought about a do loop but im not sure.
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Dept1|Dept2|Dept3|Dept4|
JV|SM|JR|JR
JV||JR|

=if(isblank(a2),$a$1,"")&if(isblank(b2),$b$1,"")&if(isblank(c2),$c$1,"")&if(isblank(d2),$d$1,"")

Results
e2: =""
e3: =Dept2Dept4

Add punctuation where you feel needed.

If Ive miss understood, please provide data and desired output.
 
Upvote 0
Pplstuff, you ROCK! Thanks! What a bittersweet solution. (why couldnt i have figured that out?) lol, seriously thank you so much.
 
Upvote 0
No problem! Glad to help. As always, there is probably a better way - this was just the first that comes to mind.
 
Upvote 0

Forum statistics

Threads
1,219,161
Messages
6,146,657
Members
450,706
Latest member
LGVBPP

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