Going Loopy

neilby

New Member
Joined
Aug 31, 2007
Messages
20
Hi all, struggling with concept of looping so could really do with your help

My problem is this
In one workbook I have a list (indeterminate number) of values which have been data sorted to group duplicates together.

Eg
JC000
JC001
JC001
JC001
JC002
JC002

In another workbook I hold a full list of possible values with associated information

Eg
Column A B C D
Row
132 JB899 Languages Year 2 Manager A
133 JC000 Maths Year 4 Manager B
134 JC001 Science Year 1 Manager C
135 JC002 Science Year 2 Manager C
136 JC003 Science Year 3 Manager C


I need a way to
1. Identify each value from workbook A in turn (and the number of times it appears).
2. Find that value in Workbook B.
3. Pick up the associated data
4. Apply that data in Workbook A to the cells to the right of the initial search value.

Preferred Result =

JC000 Maths Year 4 Manager B
JC001 Science Year 1 Manager C
JC001 Science Year 1 Manager C
JC001 Science Year 1 Manager C
JC002 Science Year 2 Manager C
JC002 Science Year 2 Manager C


Thanks for any help you can give with this.
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
like this?
Excel Workbook
ABCD
1JB899LanguagesYear2ManagerA
2JC000MathsYear4ManagerB
3JC001ScienceYear1ManagerC
4JC002ScienceYear2ManagerC
5JC003ScienceYear3ManagerC
Sheet2
Excel Workbook
ABCD
1JC000MathsYear4ManagerB
2JC001ScienceYear1ManagerC
3JC001ScienceYear1ManagerC
4JC001ScienceYear1ManagerC
5JC002ScienceYear2ManagerC
6JC002ScienceYear2ManagerC
Sheet3
Cell Formulas
RangeFormula
B1=VLOOKUP($A1,Sheet2!$A$1:$D$5,COLUMNS($A1:B1),0)
C1=VLOOKUP($A1,Sheet2!$A$1:$D$5,COLUMNS($A1:C1),0)
D1=VLOOKUP($A1,Sheet2!$A$1:$D$5,COLUMNS($A1:D1),0)


just curious, why do you need the sets to repeat
 
Upvote 0
Thanks for your reply Sankar, I'm looking for a macro solution if possible as I beleive this will be a more 'slimline' system solution as I have 12500 records in Worksheet B and any number of source values in Worksheet A.

I need the information on each line in Worksheet A to allow me to be able to more easily data sort/subtotal Workbook A for management reporting

Neil
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

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