Increase Cell in VLookup

smund

Board Regular
Joined
Mar 15, 2005
Messages
52
Please,


ActiveCell.Value = "=VLOOKUP(a3,QuadroPacientes,2,FALSE)"

How to increase the cell A3 to A4, ...when I fill a column.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
The Row will automatically update when you autofill it as long as you dont make your value absolute ($).


Code:
ActiveCell.AutoFill Destination:=Range("A1:A23"), Type:=xlFillDefault

Depending on where you need it to fill the formula, you can adjust as needed.
 
Upvote 0
Hi, (Oi)

Assuming your names (vlookup_value) in A3:A5 and the results in B3:B5 try this

Code:
Sub Test()
    Dim rng As Range
    
    Set rng = Range("B3:B5")
    
    rng.Formula = "=VLOOKUP(A3,QuadroPacientes,2,FALSE)"
    
End Sub

M.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,696
Members
452,938
Latest member
babeneker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top