Need help in IF and WORKDAY formula!

johnko

Board Regular
Joined
Aug 18, 2016
Messages
71
Hi, I need help in these two functions which I want to compute it into a formula for my data.


Cell L Cell M Cell N
First Day Last Day Comments

02/09/2016 07/09/2016 Dealers Please Take Note

07/09/2016 Liquidate

09/09/2016 To liquidate or waiting for approval




I want to do a IF WORKDAY or VBA codes to compute the workday of Last day/First day

-First day on Cell "L"
-Last day on Cell "M"
-Comments on Cell "N"

Dates on "First day" cell are the first priority.
Note that some of my data doesn't have dates on "First Day", if that so, take the dates on "Last Day"

I want to have an IF function that if it is:
-1 to 2 days from the today(eg. 07/09/2016), I want to have a "To liquidate" comment on cell N
-3 to 4 days, "To liquidate or waiting for approval"
-5 to 7 days, "Dealers please take note"

As it will have a large data, I would like it to be autofill down cell "N"

I am sure that a simple IF and WORKDAY function is not enough for these to work so I think a VBA code should work.

Hope the pros and gurus here are able to help me. Thanks in advance!

PS. The dates are in dd/mm/yy format.
 
Last edited:
you have a nested if
the way the if works is split into 3 parts

the test
if true
if false

separated with a comma

so like an else statement

IF(M2 < TODAY()+8,"Dealers please take note","other text like an else"))

and you can nest the rules


Hi There, I had created this
=IF(L22<>"",IF(L22<WORKDAY(TODAY(),2,),"To liquidate",IF(L22<WORKDAY(TODAY(),4,),"To liquidate or waiting for approval","Dealers please take note"))),IF(M22<WORKDAY(TODAY(),2),"To liquidate",IF(M22<WORKDAY(TODAY(),4),"To liquidate or waiting for approval","Dealers Please Take Note"))

It works for the column L but it shows #VALUE when I use it on column M. How is that so. Help me guru! Thanks!
 
Upvote 0

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
you have a nested if
the way the if works is split into 3 parts

the test
if true
if false

separated with a comma

so like an else statement

IF(M2 < TODAY()+8,"Dealers please take note","other text like an else"))

and you can nest the rules


Hi There, I had created this
=IF(L22 < >" ",IF(L22 < WORKDAY(TODAY(),2,),"To liquidate",IF(L22 < WORKDAY(TODAY(),4,),"To liquidate or waiting for approval","Dealers please take note"))),IF(M22 < WORKDAY(TODAY(),2),"To liquidate",IF(M22 < WORKDAY(TODAY(),4),"To liquidate or waiting for approval","Dealers Please Take Note"))<workday(today(),2,),"to liquidate="" or="" waiting="" for="" Note?))

It works for the column L but it shows #VALUE when I use it on column M. How is that so. Help me guru! Thanks! </workday(today(),2,),"to>
 
Upvote 0
try this way around

=IF(L22="",IF(M22 < WORKDAY(TODAY(),2),"To liquidate",IF(M22 < WORKDAY(TODAY(),4),"To liquidate or waiting for approval","Dealers Please Take Note")),IF(L22 < WORKDAY(TODAY(),2,),"To liquidate",IF(L22 < WORKDAY(TODAY(),4,),"To liquidate or waiting for approval","Dealers please take note")))
 
Upvote 0
try this way around

=IF(L22="",IF(M22 < WORKDAY(TODAY(),2),"To liquidate",IF(M22 < WORKDAY(TODAY(),4),"To liquidate or waiting for approval","Dealers Please Take Note")),IF(L22 < WORKDAY(TODAY(),2,),"To liquidate",IF(L22 < WORKDAY(TODAY(),4,),"To liquidate or waiting for approval","Dealers please take note")))

Hi there! I have tried doing it alone and it works! Thanks! While this is completed, I have another set of data needed to be code, are you available to take a look at it? I will upload to box.com and share the link here. Thanks!
 
Upvote 0
if a different question, why not start a new thread and then other members will also look at that new thread
and just add a link here to the new thread and I will also see it
 
Upvote 0
i'm afraid i do not provide VBA on forums - not that proficient
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,662
Members
449,462
Latest member
Chislobog

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