Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Error in Vlookup formula

Hi
I'm not sure where my error is in this code. In other formulas, this works.

Dim RW As Integer
RW=1
ActiveCell.Formula = "=vlookup(C & rw,ShopNames!A3:B100,2)"

The "C" is referring to the C column and the "& rw" is referring to row RW,
what ever the row # happens to be.

What am I missing?

Thanks
Fred
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Error in Vlookup formula

try
ActiveCell.Formula = "=vlookup(C" & rw & ",ShopNames!A3:B100,2)"


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fred" wrote in message
...
Hi
I'm not sure where my error is in this code. In other formulas, this
works.

Dim RW As Integer
RW=1
ActiveCell.Formula = "=vlookup(C & rw,ShopNames!A3:B100,2)"

The "C" is referring to the C column and the "& rw" is referring to row
RW,
what ever the row # happens to be.

What am I missing?

Thanks
Fred


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,440
Default Error in Vlookup formula

Hi Fred,

ActiveCell.Formula = "=vlookup(" & c & rw & ",ShopNames!A3:B100,2)"

--
Kind regards,

Niek Otten
Microsoft MVP - Excel



"Fred" wrote in message ...
| Hi
| I'm not sure where my error is in this code. In other formulas, this works.
|
| Dim RW As Integer
| RW=1
| ActiveCell.Formula = "=vlookup(C & rw,ShopNames!A3:B100,2)"
|
| The "C" is referring to the C column and the "& rw" is referring to row RW,
| what ever the row # happens to be.
|
| What am I missing?
|
| Thanks
| Fred


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 90
Default Error in Vlookup formula

Thanks Don.
I had tried the quotes, but forgot about the second ampersand. Work great
now!
Fred

"Don Guillett" wrote:

try
ActiveCell.Formula = "=vlookup(C" & rw & ",ShopNames!A3:B100,2)"


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Fred" wrote in message
...
Hi
I'm not sure where my error is in this code. In other formulas, this
works.

Dim RW As Integer
RW=1
ActiveCell.Formula = "=vlookup(C & rw,ShopNames!A3:B100,2)"

The "C" is referring to the C column and the "& rw" is referring to row
RW,
what ever the row # happens to be.

What am I missing?

Thanks
Fred



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Error in Vlookup formula

Maybe...

ActiveCell.Formula = "=vlookup(C" & rw & ",ShopNames!A3:B100,2)"

Fred wrote:

Hi
I'm not sure where my error is in this code. In other formulas, this works.

Dim RW As Integer
RW=1
ActiveCell.Formula = "=vlookup(C & rw,ShopNames!A3:B100,2)"

The "C" is referring to the C column and the "& rw" is referring to row RW,
what ever the row # happens to be.

What am I missing?

Thanks
Fred


--

Dave Peterson


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
vlookup formula error Samantha Excel Worksheet Functions 2 April 10th 10 01:41 PM
N/A Error with VLOOKUP Formula - Excel 2007 David Scarfe Excel Worksheet Functions 6 January 3rd 10 05:12 AM
#Ref error when using vlookup formula neil Excel Worksheet Functions 2 May 14th 07 08:35 PM
VLOOKUP Formula causing an error japc90 Excel Discussion (Misc queries) 2 July 25th 06 11:36 PM
Error in vlookup formula Minos Excel Worksheet Functions 4 July 5th 06 05:29 AM


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