Aligning data from Text and Adjacent Cells into columns - Best way to achieve this?

jacketpotato

New Member
Joined
Mar 13, 2022
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello Experts,
Please see the attached. I am trying to align the data in this in the best way possible, that will be able (hopefully) to automatically do this for ongoing data which is automatically generated into this spreadsheet. I've so far been trying to use IFERROR, MATCH, VLOOKUP...but having had no experience of those functions previously I think I'm veering off track, and going to end up using a long winded solution if I do keep trying to learn this myself.

So..
For example '0 secs' and 'p&l' always contain their values in the adjacent cells. However they are not always in the same columns, which is making analysis and particularly PivotTables very difficult to use without manual manipulation beforehand.
There is a lot I'd like to do, but if you could help me even pull out one of the quoted examples and align into a new column that would probably teach me how to do the rest of the changes myself.

So - for the example - I have freed up columns A and B. Could you please show me the best way for these new blank columns to contain '0 secs' (into A) and it's result (into B) - the result is every adjacent (first cell to the right) of '0 secs'? In the same way I have manually done in pic2.

For the purpose of any formulas, the data I'll be doing this is ongoing (currently just over 2000 rows, and has a limit of perhaps the first 40/50 columns, currently as far as AK but if the searched range could just be 'All data' or the entire Spreadsheet that would be fine.

Really appreciate any help.
 

Attachments

  • PIC1.PNG
    PIC1.PNG
    41.2 KB · Views: 25
  • PIC2.PNG
    PIC2.PNG
    43.3 KB · Views: 21

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Please close thread

I have successfully managed using the INDEX MATCH and OFFSET rules.
 
Upvote 0
Welcome to the MrExcel board!

I have successfully managed using the INDEX MATCH and OFFSET rules.
Given that OFFSET is a volatile function and it sounds like you might end up with a lot of these formulas, you may find your worksheet becoming sluggish.

I think that the following non-volatile formulas should do the job for you.

In A1 & down:
Excel Formula:
=IF(ISNUMBER(MATCH("0 secs",C1:ZZ1,0)),"0 secs","")

In B1 & down:
Excel Formula:
=IF(A1="","",INDEX(C1:ZZ1,MATCH(A1,C1:ZZ1,0)+1))

BTW, we do not close threads in this forum as you never know when another/better solution might come along. However, if a solution suits you, you can mark it as the solution - see my signature block below for more details.
 
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,020
Members
452,542
Latest member
Bricklin

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