picking data from another table

mani_singh

Well-known Member
Joined
Jul 24, 2007
Messages
583
hi everyone,

i have a problem in that i need a macro command to:

go to a table called "tier control" and copy some data into a table called "datatable"

- on "datatable" i input a value into column B, this value needs to be found in the table on "tier control" column A

- it then needs to copy from that table row cols A,D,E and F.

- and copy them into the "datatable" row originally typed into with the first value

- in the row the data must go on cols O,P,Q and R


and thats it!

i hope someone can give me a hand with this prob!

thanks :biggrin:
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hi
Paste the following codes in the macro window ( Alt F11)
Code:
sub tranfer()
x= worksheets("datatable").cells(rows.count,2).end(xlUp).row
y= worksheets("tiercontrol").cells(rows.count,1).end(xlUp).row
for a = 1 to x
for b = 1 to 4
c = choose(b, 1,4,5,6)
d= "A1:A" & y
worksheets("datatable").cells(a,b+14) = application.worksheetfunction.vlookup(cells(a,2), worksheets("tiercontrol").range(d), c,false)
next b
next a
endsub
run the macro
Ravi
 
Upvote 0

Forum statistics

Threads
1,215,022
Messages
6,122,726
Members
449,093
Latest member
Mnur

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