Multiple Formulas in One Cell

acappiello

New Member
Joined
May 20, 2016
Messages
2
This is what I have

I need this formula

=IF(I5="M-S",IF(E5="W",WORKDAY(A5,-9),IF(E5="BW",WORKDAY(A5,-14))))

AND all of these in one cell

=IF(I5="T-M",IF(E5="W",WORKDAY(A5,-9),IF(E5="BW",WORKDAY(A5,-14))))

=IF(I5="W-T",IF(E5="W",WORKDAY(A5,-8),IF(E5="BW",WORKDAY(A5,-13))))

=IF(I5="T-W",IF(E5="W",WORKDAY(A5,-7),IF(E5="BW",WORKDAY(A5,-12))))

=IF(I5="F-T",IF(E5="W",WORKDAY(A5,-6),IF(E5="BW",WORKDAY(A5,-11))))

Thanks!
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Welcome to the forum.

My suggestion would be:
Code:
=IF(OR(E5="W",E5="BW"),WORKDAY(A5,CHOOSE(MATCH(I5,{"M-S";"T-M";"W-T";"T-W";"F-T"},0),-9,-9,-8,-7,-6)-5*(E5="BW")))

If E5 will always be W or BW, then you can leave out the IF:
Code:
=WORKDAY(A5,CHOOSE(MATCH(I5,{"M-S";"T-M";"W-T";"T-W";"F-T"},0),-9,-9,-8,-7,-6)-5*(E5="BW"))

If E5 is anything else than W or BW, then the first formula willl return FALSE, according to the formulas you supplied.
 
Upvote 0
This seems to be the direction I want to go with, however my dates are off for everything but m-s. Where in the formula can I edit those?
 
Upvote 0
What do you mean: off? Can you give an example?
Otherwise it shouldn't be too difficult to identify the elements from your inputs in the formula.

By the way: shouldn't you account for any holidays as 3rd argument of the WORKDAY function?
 
Upvote 0

Forum statistics

Threads
1,223,250
Messages
6,171,036
Members
452,374
Latest member
keccles

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