LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Get current cell value and place formula based on it in another column

Hi,

I'm trying to get a macro that will allow me to get information from a
separate worksheet based on the text in the currently select cell, and
place it 5 columns to the right. I got the vlookup working fine if not
in the macro, but when i execute it It says "Method 'FormulaR1C1' of
object 'range' failed".

Help is greatly appreciated. Thanks

Francisco Roque


Sub GetPriceandCount()
'
' GetPriceandCount Macro
' Macro recorded 09/10/2006 by Francisco Roque
'
' Keyboard Shortcut: Option+Cmd+p
'
Dim itemName As String
itemName = ActiveCell.Value
ActiveCell.Offset(0, 5).Select
ActiveCell.FormulaR1C1 = "=VLOOKUP(armourName;
Database!$A$1:$P$3869;13;FALSE)/100"

 
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
Static current date based on when data in another column was enter Daniel Excel Worksheet Functions 3 December 4th 09 05:13 PM
Run a macro in active cell only. Want to place current date/time. time clock watcher Excel Worksheet Functions 3 July 20th 09 07:46 AM
Place number into Cell Based on Match Walter Excel Discussion (Misc queries) 4 June 8th 07 06:24 PM
Can I get current #row or #column in cell formula? ryany Excel Discussion (Misc queries) 2 February 13th 06 11:27 AM
How to populate column with formula based on value in cell Cameron Stewart Excel Programming 2 November 2nd 04 01:36 AM


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