Formula to reverse column orders and align

joshaer

New Member
Joined
Apr 11, 2014
Messages
15
Hi,

I have data that looks like this:

ABCD
1abcd
2gcd
3hid
4d

<tbody>
</tbody>

and I need a formula to convert it to look like this:


ABCD
1dcba
2dcg
3dih
4d

<tbody>
</tbody>

(i.e. the order reversed, and the last values (as per first table) all in the same column).

If it helps, the letters represent individuals, and the chain is the reporting chain (i.e. "d" is CEO of the organisation, so eventually every employee ends up reporting to "d". The challenge is that it's through different length strings.

For each individual, I have a unique ID and a unique ID for their manager. I assemble the top table by looking up the manager ID in the list of employee IDs and returning the associated manager ID (i.e. manager's manager) and so on until I get to the end ("d"). I then need to work out how to turn this around into the opposite structure, where all the "d"s are in the same column.

As I will have to hand this over to multiple people, there is a very strong preference not to use any VBA.

Thanks!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
This works for your example data:

=IFERROR(INDEX($A1:$D1,1+COUNTA($A1:$D1)-COLUMNS($A1:A1)),"")
 
Upvote 0

Forum statistics

Threads
1,214,870
Messages
6,122,019
Members
449,060
Latest member
LinusJE

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