LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Date in MATCH formula

Hi Group,
I have some code to do a Match on a date, if the date is hard coded in the
formula it works just fine, but i am trying to get that date in via a
variable.

This works:
ActiveCell.FormulaR1C1 = "=MATCH(""1/25/99""+0,DateRange,-1)"
but his does not:
ActiveCell.FormulaR1C1 = "=MATCH(" & (Z1) & "+0,DateRange,-1)"
Z1 is the variable with the same date, but it fails to get the " " around
the date and fails.

The +0 is not being used currently, but is will be used to find an
appromiate date, later in the code, one year later. It is being used in a
table with about 5 years worth of data.

Thanks,

--
David
 
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
Match formula to match values in multiple columns K[_2_] Excel Discussion (Misc queries) 2 April 22nd 10 10:22 AM
Lookup Formula: Return 1st match, then 2nd match, then 3rd match Scott Excel Discussion (Misc queries) 4 December 11th 09 05:50 AM
Macro or Formula to have a cell match the date on the tab. Cindy Excel Discussion (Misc queries) 4 September 30th 09 07:56 PM
How can I match a calculated date to closest date from a list? David P Excel Worksheet Functions 2 January 22nd 07 12:05 PM
How do I display more than one match in a Index/Match formula? Trish Excel Worksheet Functions 0 September 26th 05 10:21 PM


All times are GMT +1. The time now is 07:32 PM.

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"