Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Struggling
 
Posts: n/a
Default Compare date against multiple dates

I have a date (say current month) and I want to check to see if that date is
before, after or in the same month as other dates found in other cells.
Once it meets the condition, I want it to return a cell reference related to
the date that meets the condition.

Example: I have the current month in cell AP6. I have dates in cells K8,
AA8, AD8 & AG8. If cell AP6 is less than cell K8, then give me cell L8,
otherwise compare cell AP6 to AA8, if AP6 is less than AA8, then give me AB8,
etc until Excel has checked all of the dates. Also, if AP6 happens to be in
the same month as K8, then I need to prorate L8 based on the number of days
in K8. The same is true if AP6 is in the same month as AA8, AD8 or AG8 then
I need to prorate the corresponding cell. If none of the conditions are
true, then 0 or error is appropriate.

Because I have other things to check, using a nested IF statement doesn't
work. Any ideas on checking these conditions?

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.misc
robert111
 
Posts: n/a
Default Compare date against multiple dates


you could try and compare the "text" value of the month of the date, eg
jan,feb,mar,apr. Make a lookup table where jan=1 feb=2 mar=3


so check if the number returned from the lookup table is <, = or the
number returned when AP6 is offered to the lookup table


--
robert111
------------------------------------------------------------------------
robert111's Profile: http://www.excelforum.com/member.php...o&userid=31996
View this thread: http://www.excelforum.com/showthread...hreadid=536392

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
Calculate Start Dates based on Need-By Date? GB Excel Worksheet Functions 2 February 21st 06 06:11 PM
compare date to column data Custermd Excel Worksheet Functions 1 February 21st 06 03:57 PM
compare date ranges to set up eq Custermd Excel Worksheet Functions 0 February 21st 06 02:27 PM
How do I retrieve a date in a column of dates which > my criteria HNOWSKI Excel Worksheet Functions 0 September 7th 05 07:26 AM
Compare dates (one cell not in date format) craigcsb Excel Discussion (Misc queries) 5 June 28th 05 05:07 PM


All times are GMT +1. The time now is 01:36 AM.

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

About Us

"It's about Microsoft Excel"