Return each value in column B, for ID in column A

surkdidat

Well-known Member
Joined
Oct 1, 2011
Messages
582
Office Version
  1. 365
I require a formula that looks at the code in column A, and then returns the next value that is not already in the list. The values may or may not be unique.


Raw Data
Column AColumn B
Row 1IDCode
Row 22101773aaaaa
Row 32169394sdjkih
Row 42158156dsadd
Row 52101773nuihiu
Row 62101773fsdfsf
Row 72101773aaaaa


Required output
Column AColumn B
IDCode
Row 12101773aaaaa
Row 22101773nuihiu
Row 32101773fsdfsf
Row 42101773aaaaa
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
If I understand, then you can just filter the values in column A and sort Ascending.
 
Upvote 0
The data needs to be transferred into another sheet where the user inputs the code, and is a couple of hundred thousand lines
 
Upvote 0
After filtering, copy and paste. You are piecemealing us here. Specifics really expedite a workable answer.
 
Upvote 0
After filtering, copy and paste. You are piecemealing us here. Specifics really expedite a workable answer.
Hi there, thank you for your answer, the issue is I would need to repeat this for nearly 1000 people, but if there is not a better way I will need to see what other solutions I can come up with!
 
Upvote 0
I would urge then to use Power Query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"ID"}, {{"Count", each _, type table [ID=number, Code=text]}}),
    #"Expanded Count" = Table.ExpandTableColumn(#"Grouped Rows", "Count", {"Code"}, {"Code"})
in
    #"Expanded Count"

When you close and load, you can select the destination.

Book9
ABCDE
1IDCodeIDCode
22101773aaaaa2101773aaaaa
32169394sdjkih2101773nuihiu
42158156dsadd2101773fsdfsf
52101773nuihiu2101773aaaaa
62101773fsdfsf2169394sdjkih
72101773aaaaa2158156dsadd
Sheet1
 
Upvote 0
to be transferred into another sheet where the user inputs the code,
where is it, is it still in one workbook or in another workbook? maybe I can help

and do you have to filter it ID by ID and copy it somewhere else or something like that?
 
Upvote 0

Forum statistics

Threads
1,215,130
Messages
6,123,220
Members
449,091
Latest member
jeremy_bp001

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