Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Help needed wtih Vlookup

Hi,

I use VBA code to get data from several similar worksheets to create
one worksheet. At the end of the macro I use Vlookup to get
additional data from another (completely different) worksheet (e.g.
sheet1)

I loop through the final sheet using the folowing code:


DestSheet.Cells(LastRowT, 14).FormulaR1C1 = "=VLookup(RC[-13],sheet1!R1C1:R7C2,2,0)"



(The Macro searches in column 1 and returns the value found in
sheet1(column 2 and prints it in row 14 of the destination sheet)

Question.

1. Although the code works great, the particular column contains
formulas. What I really want is the found values as values. Can anyone
tell me how to achieve this ? (Without using a workaround solution
such as copy the column and paste it as values)


2. Perhaps using Vlookup is not the right method. Is there a different
(better) way to get the job done ?



Help is appreciated,


Farmer

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Help needed wtih Vlookup

Hi
one way: add the following line after your code:
DestSheet.Cells(LastRowT, 14).value=DestSheet.Cells(LastRowT, 14).value

--
Regards
Frank Kabel
Frankfurt, Germany


farmer wrote:
Hi,

I use VBA code to get data from several similar worksheets to create
one worksheet. At the end of the macro I use Vlookup to get
additional data from another (completely different) worksheet (e.g.
sheet1)

I loop through the final sheet using the folowing code:


DestSheet.Cells(LastRowT, 14).FormulaR1C1 =
"=VLookup(RC[-13],sheet1!R1C1:R7C2,2,0)"



(The Macro searches in column 1 and returns the value found in
sheet1(column 2 and prints it in row 14 of the destination sheet)

Question.

1. Although the code works great, the particular column contains
formulas. What I really want is the found values as values. Can

anyone
tell me how to achieve this ? (Without using a workaround solution
such as copy the column and paste it as values)


2. Perhaps using Vlookup is not the right method. Is there a

different
(better) way to get the job done ?



Help is appreciated,


Farmer


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 136
Default Help needed wtih Vlookup

DestSheet.Cells(LastRowT, 14)=Application.VLookup([RC[-13]],
[sheet1!R1C1:R7C2], 2, 0)

farmer wrote:
Hi,

I use VBA code to get data from several similar worksheets to create
one worksheet. At the end of the macro I use Vlookup to get
additional data from another (completely different) worksheet (e.g.
sheet1)

I loop through the final sheet using the folowing code:



DestSheet.Cells(LastRowT, 14).FormulaR1C1 = "=VLookup(RC[-13],sheet1!R1C1:R7C2,2,0)"




(The Macro searches in column 1 and returns the value found in
sheet1(column 2 and prints it in row 14 of the destination sheet)

Question.

1. Although the code works great, the particular column contains
formulas. What I really want is the found values as values. Can anyone
tell me how to achieve this ? (Without using a workaround solution
such as copy the column and paste it as values)


2. Perhaps using Vlookup is not the right method. Is there a different
(better) way to get the job done ?



Help is appreciated,


Farmer

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 vs. if, help needed CraigSA Excel Worksheet Functions 7 May 18th 06 11:19 AM
Help needed on VLOOKUP Dr Phibes Excel Discussion (Misc queries) 6 April 13th 06 10:00 AM
Vlookup Help Needed Eaglered Excel Discussion (Misc queries) 1 May 19th 05 10:36 PM
Help wtih date and time in the same cell Michaela Excel Worksheet Functions 3 February 9th 05 09:49 PM
How do I use Excel9.olb with computers wtih Excel 97? Tom Ogilvy Excel Programming 0 August 29th 03 01:30 AM


All times are GMT +1. The time now is 11:09 AM.

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"