LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default macro from columns to rows but adding every time a new line

Hello

I would like to have a code that transforms 2 or more columns in rows.
The special thing here is that if I change the values in the same
columns and run again the macro the new values should apear under the
old lines.

Example:

Column1 - Column2
A --------------- X
B --------------- Y
C --------------- Z

When I run the macro I want that it apears in another place in the
same document same sheet like this:

Line 1 - A B C
Line 2 - X Y Z

If I run again the macro by not changing the data in the columns the
list should update by adding the same thing under the fist 2 lines -
like this:

Line 1 - A B C
Line 2 - X Y Z
Line 3 - A B C
Line 4 - X Y Z

If I change the data in the same Columns like this....

Column1 - Column2
D --------------- G
E --------------- H
F --------------- I

.....and then run again the macro the list should update again by
adding the 2 lines like this:

Line 1 - A B C
Line 2 - X Y Z
Line 3 - A B C
Line 4 - X Y Z
Line 5 - D E F
Line 6 - G H I


I already have some kind of codes that do something similar but I need
them combined somehow:

Fist code:

Sub RoundedRectangle1_Click()
a = 27

Do While Cells(a, 3).Value < ""
a = a + 1
Loop

Cells(a, 3).Value = Range("C26").Value
End Sub


Second code:

Sub Macro6()
Range("A1:B37").Select
Selection.Copy
Range("G8").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Range("G8").Select
End Sub

I would really appreciate your help

Thanks in advance
 
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 more columns/rows Jo Davis Excel Discussion (Misc queries) 4 September 24th 08 07:57 PM
adding time in columns BAKERSMAN Excel Discussion (Misc queries) 2 June 3rd 08 05:53 PM
Adding up columns for speciic rows confused Excel Worksheet Functions 1 March 3rd 08 04:16 PM
time columns not adding correctly student New Users to Excel 2 February 9th 08 10:48 PM
Adding series, this time with a 2 axes line chart Barb Charts and Charting in Excel 1 December 9th 05 08:48 AM


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