how can I paste 10 cells but inverting the position of the cells

G

Guest

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.
 
G

Guest

If you're planning to do this multiple times and it will always be 10 cells,
you could record a macro for it.
 
K

Ken Johnson

Copy said:
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
 
D

Dave Peterson

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
 
G

Guest

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!
 
K

Ken Johnson

Hi Copy and Paste,

Thanks for those kind words.
I'll pass them on to my superiors:)

Ken Johnson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top