![]() |
Copy Selection - Transpose Selection - Delete Selection
I am trying to develop a macro which will allow me to copy a vertical
selection, paste special transpose it horizontally and then want to delete (shift cells up) the vertical selection I copied. Any thoughts on how to put this together? I am trying to develop one macro as I need to copy and transpose several hundere records. |
Copy Selection - Transpose Selection - Delete Selection
If I may suggest: record a macro that does what you need it to do,
then post the recorded macro. Indicate in the text of your email what ranges you highlighted, and what ranges are likely to vary from use to use. Dave O Eschew obfuscation |
Copy Selection - Transpose Selection - Delete Selection
On Oct 23, 10:41 am, Dave O wrote:
If I may suggest: record a macro that does what you need it to do, then post the recorded macro. Indicate in the text of your email what ranges you highlighted, and what ranges are likely to vary from use to use. Dave O Eschew obfuscation The following is the macro when the ranges are fixed: Range("A119:A126").Select Selection.Copy Range("G141").Select Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=True Range("A119:A126").Select Application.CutCopyMode = False Selection.Delete Shift:=xlUp As the ranges will shift, I am fine selecting the cells in the first range ("A119:A126" in the example above) manually but once I select the destination range ("G141" in the example above), I want to run the macro so that the data is pasted and the source is deleted by a Shift:=xlUp command. |
All times are GMT +1. The time now is 03:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com