Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Creating a list of value from an array

Hi all,
I know I've gotten this answer before by searching the forum, but I cannot
find it now. I have an array of values

userid value1 value2 value3
u001 58 64 99
u002 104 13 56
u003 23 15 86

and I want to create a list showing each distinct value for the user, like so:

u001 58
u001 64
u001 99
u002 104
u002 13
u002 56
u003 23
u003 15
u003 86

As I recall, this could be done by a pvot table, doing something strange
with the pivot. Does anyone have any suggestions?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Creating a list of value from an array

Assume your data A1:D4 with the header in Row 1
A2: u001, B2: 58, C2: 64, D2: 99
A3: u002, B3: 104 and so on....

Formulas:

In A7: ="u"&TEXT(INT((ROWS($1:1)-1)/3)+1,"000")
copy down

In B7: =INDEX($B$2:$D$4,ROWS($1:3)/3,MOD(ROWS($1:1)-1,3)+1)
copy down


"Moanster" wrote:

Hi all,
I know I've gotten this answer before by searching the forum, but I cannot
find it now. I have an array of values

userid value1 value2 value3
u001 58 64 99
u002 104 13 56
u003 23 15 86

and I want to create a list showing each distinct value for the user, like so:

u001 58
u001 64
u001 99
u002 104
u002 13
u002 56
u003 23
u003 15
u003 86

As I recall, this could be done by a pvot table, doing something strange
with the pivot. Does anyone have any suggestions?

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Creating a list of value from an array

Thanks. I think there was a more automatic way, but cannot find it.

"Teethless mama" wrote:

Assume your data A1:D4 with the header in Row 1
A2: u001, B2: 58, C2: 64, D2: 99
A3: u002, B3: 104 and so on....

Formulas:

In A7: ="u"&TEXT(INT((ROWS($1:1)-1)/3)+1,"000")
copy down

In B7: =INDEX($B$2:$D$4,ROWS($1:3)/3,MOD(ROWS($1:1)-1,3)+1)
copy down


"Moanster" wrote:

Hi all,
I know I've gotten this answer before by searching the forum, but I cannot
find it now. I have an array of values

userid value1 value2 value3
u001 58 64 99
u002 104 13 56
u003 23 15 86

and I want to create a list showing each distinct value for the user, like so:

u001 58
u001 64
u001 99
u002 104
u002 13
u002 56
u003 23
u003 15
u003 86

As I recall, this could be done by a pvot table, doing something strange
with the pivot. Does anyone have any suggestions?

Thanks

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
creating an array Richard New Users to Excel 4 March 15th 07 01:06 PM
creating an array Richard Excel Worksheet Functions 4 March 15th 07 01:06 PM
Creating an array to find months ssrvant Excel Worksheet Functions 4 June 24th 06 01:49 AM
Creating a concatenate text list by referencing an array nothingbutjeep Excel Discussion (Misc queries) 0 May 30th 06 09:46 PM
Creating array formulaes in macro Raj Excel Discussion (Misc queries) 1 April 28th 05 09:20 AM


All times are GMT +1. The time now is 06:25 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"