Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello. I have datasets exported from map data as large grids
(1024x768). I want to transform them into 3 long (768000 rows) columns, with X, Y, and the value from the grid. Example: B A A C D A C C D to be put into: X Y value 1 1 B 2 1 A 3 1 A 1 2 C 2 2 D 3 2 A 1 3 C 2 3 C 3 3 D Can anyone help? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Sun, 15 Nov 2009 11:22:52 -0800 (PST), CM
wrote: Hello. I have datasets exported from map data as large grids (1024x768). I want to transform them into 3 long (768000 rows) columns, with X, Y, and the value from the grid. Example: B A A C D A C C D to be put into: X Y value 1 1 B 2 1 A 3 1 A 1 2 C 2 2 D 3 2 A 1 3 C 2 3 C 3 3 D Can anyone help? In cell A2 put the following formula: =INT((ROW()+x-2)/x) (where x is the number of columns in your grid) In cell B2 put the following formula: =MOD(ROW()-2,x)+1 (where x is the number of columns in your grid) In cell C2 put the following formula: =INDEX(mygrid,A2,B2) (where mygrid is the range for your grid) Copy cells A2:C2 down to row x*y+1 (where x and y are the number of columns and rows respectively in your grid) Hope this helps / Lars-Åke |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Nov 15, 2:21*pm, Lars-Åke Aspelin
wrote: On Sun, 15 Nov 2009 11:22:52 -0800 (PST), CM wrote: Hello. I have datasets exported from map data as large grids (1024x768). I want to transform them into 3 long (768000 rows) columns, with X, Y, and the value from the grid. Example: B A A C D A C C D to be put into: X Y value 1 1 B 2 1 A 3 1 A 1 2 C 2 2 D 3 2 A 1 3 C 2 3 C 3 3 D Can anyone help? In cell A2 put the following formula: =INT((ROW()+x-2)/x) * *(where x is the number of columns in your grid) In cell B2 put the following formula: =MOD(ROW()-2,x)+1 *(where x is the number of columns in your grid) In cell C2 put the following formula: =INDEX(mygrid,A2,B2) *(where mygrid is the range for your grid) Copy cells A2:C2 down to row x*y+1 * (where x and y are the number of columns and rows respectively in your grid) Hope this helps / Lars-Åke Thank you very much. This works well. cheers, CM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Adding titles to formatted gridded workbook | Excel Discussion (Misc queries) | |||
Sorting Data into columns without replacing the columns with data | New Users to Excel | |||
Arrange data spanning 8 columns and 3 rows to 24 columns and 1 row | Excel Discussion (Misc queries) | |||
Transposing three columns into one row after manipulating data in columns | Excel Discussion (Misc queries) | |||
How do I sort the data in 8 columns by two of the columns? | Excel Worksheet Functions |