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

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,615
Messages
5,832,712
Members
430,156
Latest member
Amosjack1

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
Top