Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
OK, here's what I want to do.
I want to build up a text string, using dates, and then display it. Contained within that text string, will be the following information: <today's date : <number of days since start of year : <number of work days between today's data and a date in a specific cell What I'm doing is building up a string, as follows: strVar = Format(Now(), "Short Date") strVar = """" & strVar & """" & Application.International(xlListSeparator) strTempDate = Format(TempDate, "Short Date") strTempDate = """" & strTempDate & """" strVar = strVar & strTempDate strTempDate = "NETWORKDAYS(" & strVar & ")" S = S & Format(strTempDate) My theory is: strVar is set to today's date = 12/07/2007 strVar then has the appropriate separator appended to it = "12/07/2007", strTempDate is formatted as a date = 12/11/2007 strTempDate then has the '"' characters added to it = "12/11/2007" strVar is then set the two values, combined = "12/07/2007","12/11/2007" This is where it falls down. What I want to do, is insert the number of work days that are between the two values. However, with the code I have above, all I'm getting is the text "NETWORKDAYS("12/07/2007","12/11/2007")" added to my string. Can someone help? Rgds Duncs |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel functions | Excel Worksheet Functions | |||
efficiency: database functions vs. math functions vs. array formula | Excel Discussion (Misc queries) | |||
Looking for a site with functions that substitute the ATP functions | Excel Worksheet Functions | |||
User-defined functions created in Excel 2000 fail in Excel 2003 | Excel Discussion (Misc queries) | |||
Nesting functions in the functions dialog box | Excel Worksheet Functions |