Search multiple values, index next column (create a dummy for serch and paste loop)

Dummy111

New Member
Joined
Sep 20, 2010
Messages
3
Hello,
I am trying to index values defined by a search from values in a third column.
Tried with vlookup, but it did not work, dont know why. So now am trying with macros.
Here where I got without the loop:

Sub bb()
'
' bb Macro
'

'
Selection.Copy 'THIS IS THE SEARCH VALUE, STARTING AT C1'
ActiveSheet.Range("$A$1:$F$200").AutoFilter Field:=1, Criteria1:="=112265" _ "HERE I LOOK IN A COLUMN FOR THE SAME VALUE'
, Operator:=xlAnd
Selection.Offset(0, 7).Select 'AFTER I FIND THE ROW I NEED, WANT TO COPY THE SAME STARTING VALUE IN THE LAST COLUMN'
ActiveSheet.Paste
'WANT TO LOOP WITH NEXT ROW VALUE TO SEARCH FOR, LIKE C2..3..4'
' WAS PLANING TO IT MANUALY :)'

End Sub

Any help/advice would be terrific
10x
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Not sure if I exactly follow what you are trying to do. You said VLOOKUP won't work because this is in the third column... have you tried INDEX/MATCH?
 
Upvote 0

Forum statistics

Threads
1,223,231
Messages
6,170,884
Members
452,364
Latest member
springate

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