MrExcel Publishing
Your One Stop for Excel Tips & Solutions

match and Index in Vba


Posted by steve on April 03, 2001 9:42 PM

I have a pricing program that can have up to 30 plans I need to know when each plan was printed out last. My sheets that do all the calculations are like a template and sizes and prices are indexed onto the sheet with data validation match and index functions.

I have made a print user form to do my printing, what I need is to have it match the contents of I1 to range A101:A130, then to use the date and time function(I think its called "NOW")in the corrisponding cell in range B101:B130. I will then index from that list to my sheets.

Thanks for any help

steve


Posted by Dave Hawley on April 04, 2001 4:22 AM

Hi Steve, this what you mean ?

Sub HowsThis()
Dim LookFor As String

LookFor = Range("I1")

Range("A1:A130").Find(What:=LookFor, After:=Range("A1"), _
LookIn:=xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False).Offset(0, 1) = Now

End Sub

Dave

OzGrid Business Applications