organise multiple column entries to rows?

dappy

Board Regular
Joined
Apr 23, 2018
Messages
124
Office Version
  1. 2013
Platform
  1. Windows
Hi folks, i'm trying to get to a stage where i can do a vlook up and the simplest way i can think of is to organise the column information from column to row, so i have only one entry for each person, although i need the row value also to be sorted lowest value on the left. is this possible?

namevaluenamevaluevaluevaluevalue
person12person1124
peson23goes to ->person2311
person11peson445
person14
person211
peson44
peson45

<tbody>
</tbody>

thanks in advance!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Welcome to the MrExcel board!

See if this helps.
Formula in D2 is copied down as far as you might need (after checking the rows - 100 in my formula - at least cover how big your data is)
Formula in E2 is copied across and down (again checking the rows referred to first)

Excel Workbook
ABCDEFGH
1namevaluename
2person12person1124
3person23person2311
4person11peson445
5person14
6person211
7peson44
8peson45
9
Rearrange Data
 
Last edited:
Upvote 0
Solution
Thanks Peter that is really fantastic, does the job perfectly!

I've been racking my brain for days over this :)

thanks again

Carl
 
Upvote 0
Hi Peter,

Many thanks for your code, it works perfectly however I've issues :D

I've put it into a module and i'm getting a runtime error.

this is correct though right?

Range("D2").Formula = "=IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$100)+(A$2:A$100=""),0),0)),"")"

thanks again in advance

Carl
 
Upvote 0
this is correct though right?

Range("D2").Formula = "=IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$100)+(A$2:A$100=""),0),0)),"")"
No, when inserting a formula like that with vba, you need to double-up the quote marks

Range("D2").Formula = "=IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$100)+(A$2:A$100=""""),0),0)),"""")"
 
Upvote 0
No, when inserting a formula like that with vba, you need to double-up the quote marks

Range("D2").Formula = "=IFERROR(INDEX($A$2:$A$100,MATCH(0,INDEX(COUNTIF($D$1:D1,$A$2:$A$100)+(A$2:A$100=""""),0),0)),"""")"


Thanks again Peter. This forum is so popular, so many questions and this one disappeared way down the list quite quickly so cheekily i asked in a different question and was answered by Rory.

thanks again chaps

Carl
 
Upvote 0
Thanks again Peter. This forum is so popular, so many questions and this one disappeared way down the list quite quickly so cheekily i asked in a different question and was answered by Rory.

thanks again chaps

Carl
Glad you got your answer, but for the future, please be aware of #12 of the Forum Rules. Since I didn't know of the duplicate question, it seems my time answering here was really wasted. ;)
 
Upvote 0
Glad you got your answer, but for the future, please be aware of #12 of the Forum Rules. Since I didn't know of the duplicate question, it seems my time answering here was really wasted. ;)


Hi Peter,

Understood and sincere apologies for wasting you time.

Carl
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,750
Members
448,989
Latest member
mariah3

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