Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Formula expansion

I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Formula expansion

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Formula expansion

Biff's answer is perfect but if you want to do it with VBA here is UDF

Function twoday(startday)
nextday = startday + 2
Do Until dateOK
mytest = Application.CountIf(Range("NWD"), nextday)
If mytest Then
nextday = nextday + 1
Else
dateOK = True
End If
Loop
twoday = nextday
End Function

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Formula expansion

Thank you so much. This works wonderfully! Have a great weekend! Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Formula expansion

Thank you! I'm going to print this one and keep in case this would be a
better way to do it on another spreadsheet. For now, Biff's works well.
Thank you so much for responding. You folk make my life simpler and I wish I
had your expertise! Have a great weekend! Connie

"Bernard Liengme" wrote:

Biff's answer is perfect but if you want to do it with VBA here is UDF

Function twoday(startday)
nextday = startday + 2
Do Until dateOK
mytest = Application.CountIf(Range("NWD"), nextday)
If mytest Then
nextday = nextday + 1
Else
dateOK = True
End If
Loop
twoday = nextday
End Function

best wishes

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Formula expansion

One spreadsheet in my workbook is a little different from the rest. The
formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",IF(J3="LOW SLIP",H3+3,H3+1)))
How do I incorporate this extra function to it? I tried, but the two ways I
tried didn't work. Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Formula expansion

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,IF(J3="LOW
SLIP",3,1),NWD)))


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote:

One spreadsheet in my workbook is a little different from the rest. The
formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",IF(J3="LOW SLIP",H3+3,H3+1)))
How do I incorporate this extra function to it? I tried, but the two ways I
tried didn't work. Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie




  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 251
Default Formula expansion

Thank you, Biff. Thank you so much. That appears to be working great.
Double great weekend to you. Keep safe! Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,IF(J3="LOW
SLIP",3,1),NWD)))


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote:

One spreadsheet in my workbook is a little different from the rest. The
formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",IF(J3="LOW SLIP",H3+3,H3+1)))
How do I incorporate this extra function to it? I tried, but the two ways I
tried didn't work. Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie



  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 73
Default Formula expansion

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Connie Martin" wrote:

Thank you, Biff. Thank you so much. That appears to be working great.
Double great weekend to you. Keep safe! Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,IF(J3="LOW
SLIP",3,1),NWD)))


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote:

One spreadsheet in my workbook is a little different from the rest. The
formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",IF(J3="LOW SLIP",H3+3,H3+1)))
How do I incorporate this extra function to it? I tried, but the two ways I
tried didn't work. Connie

"T. Valko" wrote:

Try this:

=IF(H3="","",IF(H3="Not Scheduled","TBA",WORKDAY(H3,2,NWD)))

The WORKDAY function requires that you have the Analysis ToolPak add-in
installed if you're using a version of Excel prior to Excel 2007.

You'll probably have to format the cell as Date.


--
Biff
Microsoft Excel MVP


"Connie Martin" wrote in message
...
I need to add something to an existing formula and am not sure where or how
exactly to place it. My formula is:
=IF(H3="","",IF(H3="Not Scheduled","TBA",H3+2))

I have a named range called "NWD". That range is dates, formatted as
dates.
It is actually all the non-work days of the year. The above formula is
giving me a date of two days beyond the date in H3, however, if the date
that
is returned by the formula falls on a non-work day, it needs to go to the
next work day, so it needs to exclude any dates in the named ranged "NWD".
Thank you. Connie



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
word wrap without row expansion? Kane Excel Discussion (Misc queries) 5 October 15th 08 10:12 PM
Expansion of COUNT if Question Adam Excel Worksheet Functions 1 July 23rd 08 06:25 PM
Formula Expansion Appache Excel Discussion (Misc queries) 3 March 11th 08 08:14 AM
Row Expansion Susan Excel Worksheet Functions 11 February 28th 06 07:15 PM
number expansion and contraction tom donino Excel Worksheet Functions 2 December 23rd 04 08:11 PM


All times are GMT +1. The time now is 08:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"