Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP related question
Assuming that you are using an exact match Vlookup, you can use the Match
function to get the row position. Cells(Worksheetfunction.match(VLookupValue,First Vllookup column,0),datecolumn)=Now() -- If this helps, please remember to click yes. "Wyzzard" wrote: I have two worksheets. The first worksheet is data that is updated daily. The second worksheet is a static list of data that is referenced to give instructions for the daily data. For example, the daily data might have something called Vers1. Using VBA it is set up so that when a button on the first worksheet is pressed, it calls VLOOKUP against the data in worksheet 2 and finds out that Vers1 uses XYZ. Every version in the reference sheet isn't used every day and they occasionally become obsolete. What I would like to do is have a column on the second reference sheet that would have the current date placed into each cell if that Version was used that day to help track the last used date. Is there any way to find out what the row location is for a VLOOKUP match so that I could just have something like Cell_location(VLOOKUP_Row, Date_Column) = Now() Hopefully that makes sense... Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP related question
I'm pretty sure that's what I need to do what I want... now I just need to
get Excel to cooperate. Been tinkering with it all afternoon but all I get are assorted errors. I'll try again tomorrow and if I still have trouble getting it to work I'll provide extra info on what's going on. Thanks for the response... "Paul C" wrote: Assuming that you are using an exact match Vlookup, you can use the Match function to get the row position. Cells(Worksheetfunction.match(VLookupValue,First Vllookup column,0),datecolumn)=Now() -- If this helps, please remember to click yes. "Wyzzard" wrote: I have two worksheets. The first worksheet is data that is updated daily. The second worksheet is a static list of data that is referenced to give instructions for the daily data. For example, the daily data might have something called Vers1. Using VBA it is set up so that when a button on the first worksheet is pressed, it calls VLOOKUP against the data in worksheet 2 and finds out that Vers1 uses XYZ. Every version in the reference sheet isn't used every day and they occasionally become obsolete. What I would like to do is have a column on the second reference sheet that would have the current date placed into each cell if that Version was used that day to help track the last used date. Is there any way to find out what the row location is for a VLOOKUP match so that I could just have something like Cell_location(VLOOKUP_Row, Date_Column) = Now() Hopefully that makes sense... Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP related question
Well it's been longer than I wanted to get back to this... too many projects
with the new boss and this is a minor thing... still unable to get this to work. Here's what I've tried - Set ranArrayRange = Worksheets(2).Range("A2:G215") intCellRow = WorksheetFunction.Match(Worksheets(1).Cells(3,3).V alue, ranArrayRange, 0) I actually use the worksheets name instead of numbers, just used these to make it easier to understand. I know this doesn't do exactly what I wanted originally but I figured if I could get it to work with this simplified version I could make it do the rest that I wanted easy enough. This gives me a "Runtime Error '1004' - Unable to get the Match property of the WorksheetFunction class" Any new suggestions would be great. Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP related question
"Match" requires a single column (row) in which to look. "VLookUp" can look in one column and return the value in the same row in another column. The "Find" method (VBA) will search an entire range. You have to decide which is the correct one to use. -- Jim Cone Portland, Oregon USA ( http://tinyurl.com/PrimitiveSoftware ) "Wyzzard" wrote in message ... Well it's been longer than I wanted to get back to this... too many projects with the new boss and this is a minor thing... still unable to get this to work. Here's what I've tried - Set ranArrayRange = Worksheets(2).Range("A2:G215") intCellRow = WorksheetFunction.Match(Worksheets(1).Cells(3,3).V alue, ranArrayRange, 0) I actually use the worksheets name instead of numbers, just used these to make it easier to understand. I know this doesn't do exactly what I wanted originally but I figured if I could get it to work with this simplified version I could make it do the rest that I wanted easy enough. This gives me a "Runtime Error '1004' - Unable to get the Match property of the WorksheetFunction class" Any new suggestions would be great. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using VLookup, how can I retireve the related columns. | Excel Programming | |||
date related question??? | Excel Worksheet Functions | |||
Another Date related question.... | Excel Worksheet Functions | |||
Input Box Related Question | Excel Programming | |||
I have a VB related question,... | Excel Programming |