Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default X-Y gridded data into columns

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default X-Y gridded data into columns

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default X-Y gridded data into columns

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
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
Adding titles to formatted gridded workbook Kathy Excel Discussion (Misc queries) 2 January 12th 09 05:34 PM
Sorting Data into columns without replacing the columns with data Sandaime New Users to Excel 2 October 18th 07 01:35 PM
Arrange data spanning 8 columns and 3 rows to 24 columns and 1 row pfdino Excel Discussion (Misc queries) 2 March 19th 07 09:03 PM
Transposing three columns into one row after manipulating data in columns digitaldon Excel Discussion (Misc queries) 1 November 20th 06 11:35 PM
How do I sort the data in 8 columns by two of the columns? Sorting Excel Worksheet Functions 1 October 25th 05 03:57 PM


All times are GMT +1. The time now is 11:33 PM.

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

About Us

"It's about Microsoft Excel"