Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 367
Default Find string/date in array to get value of nearby cell

It's giving me a Run-time error '13' Type Mismatch on the lngRow line no
matter what I try.

"Jacob Skaria" wrote:

Hi Jason

The below macro will return the entry 5 rows down from the date entry
06-Aug-2009 in Column A. Hope the date entry is in excel date format. Try and
feedback

Sub Macro()

Dim dtTemp As Date, lngRow As Long
dtTemp = DateValue("06-Aug-2009")
lngRow = WorksheetFunction.Match(dtTemp, Range("A:A").Value, 0)
MsgBox Range("A" & lngRow + 5)

End Sub

If this post helps click Yes
---------------
Jacob Skaria


"Jason" wrote:

I have an array that contains all sorts of text in column A.
I would like to know how I can search for certain date (example "6-Aug") and
then get the value of the cell that is 5 rows below that date?

The date is a web query where the only pattern I can find is the data I need
for each date is 5 rows below the corresponding date.

Thanks!

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
Array formula to find date Amylou Excel Worksheet Functions 0 March 25th 10 04:17 PM
Excel keeps changing my formulas to include nearby cells. emeraldc Charts and Charting in Excel 1 May 25th 08 06:49 AM
Find & Replace String Array - More Than 255 Characters? Rawce Excel Programming 0 June 11th 07 02:10 PM
Compare String in Cell to an Array jbtenor1 Excel Programming 3 March 29th 06 02:36 PM
macro to find date in the string nshanmugaraj[_8_] Excel Programming 3 March 4th 06 12:30 PM


All times are GMT +1. The time now is 07:18 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"