Looping through a data set and retrieving values

Ronanm

Board Regular
Joined
Nov 13, 2010
Messages
107
1
FindFound
22RedClareWalker
33BlackPaulBinns
45PurpleSharonCodd
Result
1
Blue

<tbody>
</tbody>
John

<tbody>
</tbody>
Smith

<tbody>
</tbody>
2RedClareWalker
3BlackPaulBinns
4PinkDavidJames
5PurpleSharonCodd

<tbody>
</tbody>

Hi
Couldn't work out how to put this text above the table.

I want to have some code that loops through Column D ("Find"), matches the number in Column A and pulls out the three cells to the right of that (As shown). However the numbers in the column above the word "Result" get ignored and sometimes there is more or less that the four currently showing above the word "Result".

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Why can't you just use VLOOKUP do this (no VBA or looping necessary)?
 
Upvote 0
Why can't you just use VLOOKUP do this (no VBA or looping necessary)?

Hi

I would do normally, but I will be looping through many thousands of rows, based on other conditions before I need to loop through this part of the data set.

Thanks
 
Upvote 0
I am not sure I understand what it is that you are after then, if not VLOOKUP. It doesn't really matter how mnay rows there are, VLOOKUP can handle thousands of rows.
If there are "other conditions" that need to be considered, I think we need more of those details to get a better understanding of what you are trying to do.
 
Upvote 0
I wanted code so that it could slip into a large piece of work I'm doing. Vlookup I've been using for over 20 year but it doesn't fit here. I've pulled something together that works for me, so I'm fine as it stands.
 
Upvote 0
I've pulled something together that works for me, so I'm fine as it stands.
Would you mind posting what you came up with?
I am curious to hear what you did (and hat may also help answer some of questions about the details that I had).
 
Upvote 0

Forum statistics

Threads
1,214,808
Messages
6,121,686
Members
449,048
Latest member
81jamesacct

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