Home |
Search |
Today's Posts |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro to transpose data
Public Sub AddressSort()
last = ActiveSheet.UsedRange.Row - 1 + _ ActiveSheet.UsedRange.Rows.Count With Worksheets(1) For x = last To 2 Step -1 If .Cells(x, 1).Value < "" And _ .Cells(x - 1, 1).Value < "" Then .Range(.Cells(x, 1), .Cells(x, 10)).Cop Destination:=.Range(.Cells(x - 1, 2), .Cells(x - 1, 2)) .Rows(x).Delete End If Next x .Range("A:A").SpecialCells(xlCellTypeBlanks).Entir eRow.Delete End With End Sub Let me know if you have any questions. - Piku -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro to transpose data
Hi pikus,
I came accross this post while searching for a solution to the sam problem as Chuck Jurgens. Can you please explain how to use the code that you provided? I'm using Excel 2000. Where do I put the code that you provided and ho do I execute it? Thank you -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro to transpose data
The code provided deleted some blank lines and deleted some of the data. At
least with the sample data in the original post. It didn't transpose anything. So it might not make any difference where to put it, but you would put it in a general module. Then go into tools=Macro=Macros, select AddressSort and click Run Do this on a copy of your workbook and use it on the copy if you don't want to lose your data. -- Regards, Tom Ogilvy "uniopp " wrote in message ... Hi pikus, I came accross this post while searching for a solution to the same problem as Chuck Jurgens. Can you please explain how to use the code that you provided? I'm using Excel 2000. Where do I put the code that you provided and how do I execute it? Thank you. --- Message posted from http://www.ExcelForum.com/ |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help with macro to transpose data
OK, I understand how to run the code and I did get it to work on some o
my tests but I would like to understand what the code means and how t modify it to suite my situation (e.g add more rows to the origina address field sample provided by Chuck Jurgens). Could someone please explain each line of the code and what it actuall does. Pehaps someone could also reccommend a good (Basic) book tha explains how to make excel macros? Thank you -- Message posted from http://www.ExcelForum.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Transpose or Macro? | Excel Discussion (Misc queries) | |||
How do I group and transpose data - macro help needed. | Excel Worksheet Functions | |||
Do I need a Macro to do Transpose in this case? | Excel Discussion (Misc queries) | |||
Transpose Macro | Excel Worksheet Functions | |||
help with transpose-like macro | Excel Programming |