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

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
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,223,162
Messages
6,170,432
Members
452,326
Latest member
johnshaji

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