Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 269
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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
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
Using VLookup, how can I retireve the related columns. Mary Ann[_2_] Excel Programming 2 September 4th 08 11:00 PM
date related question??? _Bigred Excel Worksheet Functions 1 January 4th 07 01:23 AM
Another Date related question.... Pete Dray Excel Worksheet Functions 7 June 18th 06 11:49 PM
Input Box Related Question Kevin B Excel Programming 0 January 19th 06 03:31 PM
I have a VB related question,... javabeens Excel Programming 1 June 7th 05 05:51 PM


All times are GMT +1. The time now is 06:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"