Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-29-2015, 12:03 PM
jyfuller jyfuller is offline How to create vlookup formula range R1C1 using VBA Windows 7 64bit How to create vlookup formula range R1C1 using VBA Office 2007
Advanced Beginner
How to create vlookup formula range R1C1 using VBA
 
Join Date: Jun 2012
Posts: 32
jyfuller is on a distinguished road
Default How to create vlookup formula range R1C1 using VBA

Can someone please explain to me how to create a vlookup formula using Activecell.FormulaR1C1 in VBA? BUT using "$A$1:$B$33" style instead of R1C1, as I need the range to stay absolute instead of relative. The R1C1 formula in VBA is always relative to the activecell location. For example the following does not work in VBA. "Merchant list" is the sheet of reference:

ActiveCell.FormulaR1C1 = _
"=VLOOKUP(RC3,'Merchant List'!" "$A$2:$B$22" & ",3,False)"

I want the cell of reference RC3 to stay relative, but the lookup table "A2:B22" to stay absolute.

Thanks,

J
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Help with vlookup r1c1 formula in VBA jyfuller Excel Programming 0 04-27-2015 01:58 PM
VLOOKUP looking at another cell for its range Rich18144 Excel 1 06-24-2014 07:56 AM
IF + VLOOKUP formula help skyline255 Excel 0 09-19-2012 05:05 PM
how to read R1C1 formula Suhanti Excel 2 10-16-2010 11:30 AM
How to create vlookup formula range R1C1 using VBA Need Help With SUMIF Formula In R1C1 Style Todd Excel 9 02-27-2010 08:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft