Move all matches in column up to the corresponding row?

daveasu

Board Regular
Joined
Jan 4, 2012
Messages
53
In a spreadsheet I have employee names in Column A and corresponding data in Column B. I need to find the data in Column B that matches the employee names and move that data up to a single row per employee.

I tried an array formula
=ADDRESS(3,MAX((3:3<>"")*COLUMN(3:3)),1)


and the MATCH function
=MATCH(TRUE,INDEX(ISBLANK(B1:B3000),0,0),0)

But, couldn't find a combination that would return the values (and put them in the next blank cell on the corresponding row)

Is this something that can only be solved with VBA?



r0aujr.jpg
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
A ctrl-shift-enter formula will work, something like:

=index($b$1:$b$24,small(if($a$1:$a$24=$e2,row($a$1:$a$24)),column(a1)))
 
Upvote 0
Slight change:

=INDEX($B$1:$B$24,SMALL(IF($A$1:$A$24=$E1,ROW($A$1:$A$24)),COLUMN(A1)))

ctrl-shift-enter then drag across and down, hit F5, special, formulas, errors to delete the NUMs.
 
Upvote 0
Slight change:

=INDEX($B$1:$B$24,SMALL(IF($A$1:$A$24=$E1,ROW($A$1:$A$24)),COLUMN(A1)))

ctrl-shift-enter then drag across and down, hit F5, special, formulas, errors to delete the NUMs.


That worked perfectly!! And thank you for the tip about removing error messages!

Thank you Thank you!!
 
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