vlookup in macros

helly19out

New Member
Joined
Jul 13, 2010
Messages
5
Hi,
i have created a form in which if i enter any data and run macros button it stores the data on backend ...

Sub Button2_Click()
'
' Submit Macro
' Macro for HyperExcel{copy/paste/collate QA Form data}

Dim R1 As Range
Range("c5:d10").Select ' Selecting data range to be populated in Results sheet
Selection.Copy
Sheets("Results").Select 'Selecting the Results sheet to populate from QA Form
Let X = 3 'Start from the 3rd Row of the Result sheet
Do Until Cells(X, 1).Value = "" 'Check for the first blank row
X = X + 1
Loop
Cells(X, 1).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
True, Transpose:=True
Rows("3:3").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Sheets("QA Form").Select 'Start deleting the data from the QA Form to give a blank form
Range("c5:d10").Select
Selection.ClearContents
ActiveWorkbook.Save 'Save the Workbook
End Sub

it basically cuts the data from one sheet n paste it to the new sheet .Now, i need a help as i like to add a "vlook up" in macros and the value returned back and if i change that value that will be change on the backend sheet
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,219,162
Messages
6,146,660
Members
450,706
Latest member
LGVBPP

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