If function: can the true result be a function?

rb3883

New Member
Joined
Nov 23, 2008
Messages
24
Hello and thanks for trying to help!

I have three columns: Date, Type, Start Date.

I have data in the "Date" and "Type" columns, but I need to populate the "Start Date" column.

Type can only take two values, A or B; date is just a range of future dates.

The logic is as follows: If Type = A then Start Date = Previous working day to the Date column (i.e. I need to use the Workday Function).

If Type = B then Start Date = Date (i.e. no change).

Any ideas?

Many thanks, Ryan
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Basically - structure is:
=If(A,(Date-1),Date)

Doesn't this work? Date - 1 must be the workday function of course.
 
Upvote 0
Maybe a bit more expanded assuming type in A1 and date in B1,

Formula in C1:
=IF(A1="TypeA",Workday(B1,-1),B1)
 
Last edited:
Upvote 0
Hi Mate,

That's what I thought and I can easily get the previous calendar day, getting the previous workday isn't working for me, the cell just shows the formula I have written, any other suggestions?

Thanks for coming back so quick!

Cheers, Ryan
 
Upvote 0
the cell just shows the formula I have written, any other suggestions?

Strange. Try selecting the cell and pressing {Control + ~} (both keys at the same time...)
Edit: then re-enter the formula...
 
Upvote 0
Dude, I was missing a single comma! (below in bold), I can now sleep in peace.

=IF(A1="TypeA",Workday(B1,-1),B1)

Thanks for taking the time, Ryan
 
Upvote 0

Forum statistics

Threads
1,214,553
Messages
6,120,184
Members
448,949
Latest member
keycalinc

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