Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default move cells based on group levels

I have a grouped data that looks like this:

Column A

02131 SYN.NON-NRC.INJ
DALGAN AZN 90/07
FCD DISP SYR REG IM/IV/SC
15MG/M
5MG/ML
10MG/M
FDD VIAL REGULAR IM/IV/SC
15MG/M
10MG/M
5MG/ML

So line 1 is group level 1, and second indentation is group level 2, and
third indentation is group level 3, and fourth indentation is group level 4.
They are all in the same column.
Is there a way to move second indentation to column B, third indentation to
column C and fourth indentation to column D, so that it looks like the
following:

A B C D

02131 SYN.NON-NRC.INJ
DALGAN AZN 90/07
FCD DISP SYR REG IM/IV/SC
15MG/M
5MG/ML
10MG/M
FDD VIAL REGULAR IM/IV/SC
15MG/M
10MG/M
5MG/ML


The data is massive. And it seems impossible to do it by hand. Thanks a lot.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default move cells based on group levels

Maybe...

From your post, it looks like your data has 0 leading spaces in the first level,
2 in the second level, 4 in the next, 6 in the next...

With the data in A1:A###...

I used these formulas:
In B1: =IF(LEFT($A1,1)<" ",TRIM($A1),NA())
In C1: =IF(ISTEXT(B1),"done",IF(LEFT($A1,3)<REPT(" ",3),TRIM($A1),NA()))
In D1: =IF(ISTEXT(C1),"done",IF(LEFT($A1,5)<REPT(" ",5),TRIM($A1),NA()))
In E1: =IF(ISTEXT(D1),"done",IF(LEFT($A1,7)<REPT(" ",7),TRIM($A1),NA()))

Then I dragged them down the columns.

I waited for the recalc
and converted to values
(edit|copy, edit|paste special values)

Then I used a couple of edit|replaces to get rid of #N/A's and done's
(I replaced them with nothing.)



research-assistant wrote:

I have a grouped data that looks like this:

Column A

02131 SYN.NON-NRC.INJ
DALGAN AZN 90/07
FCD DISP SYR REG IM/IV/SC
15MG/M
5MG/ML
10MG/M
FDD VIAL REGULAR IM/IV/SC
15MG/M
10MG/M
5MG/ML

So line 1 is group level 1, and second indentation is group level 2, and
third indentation is group level 3, and fourth indentation is group level 4.
They are all in the same column.
Is there a way to move second indentation to column B, third indentation to
column C and fourth indentation to column D, so that it looks like the
following:

A B C D

02131 SYN.NON-NRC.INJ
DALGAN AZN 90/07
FCD DISP SYR REG IM/IV/SC
15MG/M
5MG/ML
10MG/M
FDD VIAL REGULAR IM/IV/SC
15MG/M
10MG/M
5MG/ML

The data is massive. And it seems impossible to do it by hand. Thanks a lot.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Data Group and Outline Group" feature Limited to 8 levels MarekMG Excel Discussion (Misc queries) 3 May 25th 07 06:12 PM
WHEN I GROUP IT ERRORS WITH 'CANNOT MOVE CELLS OFF WORKSHEET?? Irene Excel Worksheet Functions 0 August 24th 06 01:23 AM
Have VBA delete a group of cells, move information over, then add Tina Bradshaw Excel Discussion (Misc queries) 0 February 22nd 06 04:07 PM
Wherever I try and move my curser to it highlights that group of c Biggie J Excel Discussion (Misc queries) 2 May 30th 05 07:26 PM
Subtract a group of cells from a total based on ending date Nicholas Scarpinato Excel Discussion (Misc queries) 0 May 17th 05 03:25 PM


All times are GMT +1. The time now is 10:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"