LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default vlookup Variables

Can you pick out a column that always has data in it when that row is used?

Dim LastRow as long
with activesheet
lastrow = .cells(.rows.count,"A").end(xlup).row
end with

I used column A in my sample.

Megadrone wrote:

I download a new spreadsheet everyday, this spreadsheet will have several new
rows everytime. I run a macro

What I need is for this lookup to automatically find the last row in the
table array

Range("H2").Select
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC[8],'[Cell Refs Update Macro
V3.xls]Lookup'!R2C1:R1770C5,3,FALSE)"
Selection.AutoFill Destination:=Range("H2:H" & lastrow)

Can anybody help me?


--

Dave Peterson
 
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
Vlookup & 2 variables Marti Excel Worksheet Functions 3 June 4th 09 09:32 PM
VLOOKUP - TWO Variables RJB Excel Discussion (Misc queries) 4 December 13th 07 08:29 AM
VLOOKUP - Two Variables RJB Excel Discussion (Misc queries) 0 December 12th 07 06:49 AM
using VLookup with two variables to get results Scott@CW Excel Discussion (Misc queries) 2 March 28th 07 07:56 PM
vlookup Variables Megadrone Excel Worksheet Functions 2 November 28th 06 11:30 PM


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