ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VLOOKUP related question (https://www.excelbanter.com/excel-programming/441894-re-vlookup-related-question.html)

Paul C

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


Wyzzard

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


Wyzzard

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

Jim Cone[_2_]

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


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com