Returning a complicated date formula

Rivermark

New Member
Joined
Jan 27, 2011
Messages
16
Here is my dilemma,

I need a date returned for a set of certain criteria:

In a cell in worksheet "invoice" I need this date based off of data in worksheet "roster".
A row in worksheet "roster" contains a single text character in 31 consecutive columns with headers labled 1-31
If a cell contains an "o" I need the header number it falls under to correspond with the month and year this billing cycle falls under, which is listed in cells above the headers. (ex. January is entered in A1 and 2011 is entered in A2)
I also need the month that is entered in A1 to return its number instead of it's name (ex. January=1, February=2, March=3,...)

I need the cell in worksheet "invoice" to read in the format of 1/1/2011 based on the above criteria.

Any help or direction would be appreciated.
 
If you have xl2007, you can use the IFERROR function...
=IFERROR(TEXT(DATEVALUE(Roster!$A$1&" "&MATCH("o",Roster!A$4:AE$4,0)&", "&Roster!$A$2),"M/D/YYYY"),"")

For xl2003, I think this will work...
=IF(ISNA(TEXT(DATEVALUE(Roster!$A$1&" "&MATCH("o",Roster!A$4:AE$4,0)&", "&Roster!$A$2),"M/D/YYYY")),"",TEXT(DATEVALUE(Roster!$A$1&" "&MATCH("o",Roster!A$4:AE$4,0)&", "&Roster!$A$2),"M/D/YYYY"))

Jerry,

You've been the biggest help here. That works flawlessly. Thanks a ton!

I do have another problem to figure out. I'd love to use your brain if you have the time? Let me know.
 
Upvote 0

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Jerry,

You've been the biggest help here. That works flawlessly. Thanks a ton!

I do have another problem to figure out. I'd love to use your brain if you have the time? Let me know.

I'm very glad to have helped, and thanks for the kind feedback. :)

If you have another question, please just start another thread. There are so many great people on this board,
odds are someone will respond right away.
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,240
Members
452,898
Latest member
Capolavoro009

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