Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cells
I'd like to copy 10 cells and paste them inverted, last cell first and first
cell last, not transpose, but vertically. Like fliping the 10 cells. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cells
If you're planning to do this multiple times and it will always be 10 cells,
you could record a macro for it. "Copy and Paste" wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cel
Sometimes it will be more than ten. Is there a way to do this without using
macros? "mattgoof2005" wrote: If you're planning to do this multiple times and it will always be 10 cells, you could record a macro for it. "Copy and Paste" wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cells
Copy and Paste wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. If you have a nearby spare column with numbers 1 to 10 (or any other sequence of increasing numbers) down that column in the same rows as your 10 cells you are wanting to copy then invert, you could invert them before copying, then paste the inverted copy. To invert before copy just select a range of cells includes your 10 cells for inversion and the cells with increasing numbers, then sort by the increasing numbers column in decreasing order. Then do the copy/paste, then resort ascending order to restore the original data's order. Ken Johnson |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cel
A macro might be the simplest way.
If you want to try: Option Explicit Sub testme03() Dim FromRng As Range Dim DestCell As Range Dim iRow As Long Dim TotalCells As Long Set FromRng = Nothing On Error Resume Next Set FromRng = Application.InputBox _ (Prompt:="Select a single column range", Type:=8) _ .Areas(1).Columns(1) On Error GoTo 0 If FromRng Is Nothing Then Exit Sub End If Set DestCell = Nothing On Error Resume Next Set DestCell = Application.InputBox _ (Prompt:="Select a single cell", Type:=8).Cells(1) On Error GoTo 0 TotalCells = FromRng.Cells.Count For iRow = 1 To TotalCells DestCell.Offset(iRow - 1, 0).Value _ = FromRng.Cells(TotalCells + 1 - iRow).Value Next iRow End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Copy and Paste wrote: Sometimes it will be more than ten. Is there a way to do this without using macros? "mattgoof2005" wrote: If you're planning to do this multiple times and it will always be 10 cells, you could record a macro for it. "Copy and Paste" wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. -- Dave Peterson |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cel
Hi Dave,
Thank you very much for your answer and for all your help! "Dave Peterson" wrote: A macro might be the simplest way. If you want to try: Option Explicit Sub testme03() Dim FromRng As Range Dim DestCell As Range Dim iRow As Long Dim TotalCells As Long Set FromRng = Nothing On Error Resume Next Set FromRng = Application.InputBox _ (Prompt:="Select a single column range", Type:=8) _ .Areas(1).Columns(1) On Error GoTo 0 If FromRng Is Nothing Then Exit Sub End If Set DestCell = Nothing On Error Resume Next Set DestCell = Application.InputBox _ (Prompt:="Select a single cell", Type:=8).Cells(1) On Error GoTo 0 TotalCells = FromRng.Cells.Count For iRow = 1 To TotalCells DestCell.Offset(iRow - 1, 0).Value _ = FromRng.Cells(TotalCells + 1 - iRow).Value Next iRow End Sub If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm Copy and Paste wrote: Sometimes it will be more than ten. Is there a way to do this without using macros? "mattgoof2005" wrote: If you're planning to do this multiple times and it will always be 10 cells, you could record a macro for it. "Copy and Paste" wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. -- Dave Peterson |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cel
Hi Ken,
That is a very simple and brilliant idea. I can't believe I didn't think of it before. Thank you very much! "Ken Johnson" wrote: Copy and Paste wrote: I'd like to copy 10 cells and paste them inverted, last cell first and first cell last, not transpose, but vertically. Like fliping the 10 cells. If you have a nearby spare column with numbers 1 to 10 (or any other sequence of increasing numbers) down that column in the same rows as your 10 cells you are wanting to copy then invert, you could invert them before copying, then paste the inverted copy. To invert before copy just select a range of cells includes your 10 cells for inversion and the cells with increasing numbers, then sort by the increasing numbers column in decreasing order. Then do the copy/paste, then resort ascending order to restore the original data's order. Ken Johnson |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
how can I paste 10 cells but inverting the position of the cel
Hi Copy and Paste,
Thanks for those kind words. I'll pass them on to my superiors:-) Ken Johnson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to repeat a paste of cells without copying again | Excel Discussion (Misc queries) | |||
How to paste data into multiple cells in Excel | New Users to Excel | |||
copy and paste between cells that have data | Excel Worksheet Functions | |||
copy & paste spreadsheet cells from excel to outlook to excel | Excel Discussion (Misc queries) | |||
Border thickness varies when I paste Excel cells into Word. | Excel Discussion (Misc queries) |