Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert row to column

Status
Not open for further replies.

gmoorthy

Programmer
Jul 13, 2004
107
US
I have an excel spreadsheet as follows

123456 abc def
123456. Xyz Mano
7890 Tyu iOS
7890. Min opu
7890 Ire xyz
6789. Abc
5678. Mano


So i need a script which will do the following

Should check the first column and if the numbers are repeated the remaining two columns should be like this if not leave it as it is

123456 abc def xyz Mano
7890. Tyu iOS Min opu ire xyz
6789. abc
5678. Mano
 
Hi,

[pre]
123456 abc def xyz Mano
7890. Tyu iOS Min opu ire xyz
[/pre]

Why does the PERIOD appear after 7890, but not after 123456?

BTW, I can remember doing stuff like this on a spreadsheet with formulas back in the '90s. As a programmer, you ought to be able to figure this one out pretty easy.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Well, I was bored so I did most of it in the attached table, except for the coup de grâce.

Results...
[pre]
123456 abc def Xyz Mano
123456 Xyz Mano
7890 Tyu iOS Min opu Ire xyz
7890 Min opu Ire xyz
7890 Ire xyz
6789 Abc
5678 Mano
[/pre]


Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
 https://files.engineering.com/getfile.aspx?folder=f9ad8314-a1e0-4ad4-b109-f31f73b4623e&file=tt-Convert_row_to_column.xlsx
Hi skip - thanks why I am not able to see the macro or formula that you suggested?
 
I uploaded a file.

But here's the formula in D1
[tt]
D1: =IF($A2=$A1,B2,"")
[/tt]
Propagate across as needed and down thru all rows.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
I forgot to mention one thing the number of rows is large like 1000 + rows hence wanted a macro



 
You think 1000 rows is large for using formulas?

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top