Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PJ PJ is offline
external usenet poster
 
Posts: 112
Default Invert excel data

How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 380
Default Invert excel data

=IF(COUNTA(A:A)-ROW()+1<1,"",INDEX(A:A,COUNTA(A:A)-ROW()+1))

and copy down.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"PJ" wrote in message
...
How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
PJ PJ is offline
external usenet poster
 
Posts: 112
Default Invert excel data

Great function. If I want to invert just 3 numbers in the column and not
the whole A column how do I change the equation?

"Bob Phillips" wrote:

=IF(COUNTA(A:A)-ROW()+1<1,"",INDEX(A:A,COUNTA(A:A)-ROW()+1))

and copy down.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"PJ" wrote in message
...
How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 84
Default Invert excel data

You could also write some code with Visual Basic.

Option Explicit
Public Sub InvertedData()
Dim i As Long 'counter
Dim ws As Long 'the number of the worksheet
Dim first As Long 'the first cell in which data starts
Dim last As Long 'the last cell of the data column
first = 2 'Suppose data starts at row two
last = 10 'Suppose data ends at row 10
ws = 1 'Suppose data is stored in worksheet 1
With Worksheets(ws)
For i = first To last
.Cells(i, 2) = .Cells(last - i + first, 1)
Next i
End With
End Sub


--
Carlos


"Bob Phillips" wrote:

=IF(COUNTA(A:A)-ROW()+1<1,"",INDEX(A:A,COUNTA(A:A)-ROW()+1))

and copy down.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"PJ" wrote in message
...
How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1




  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Invert excel data

=INDEX(A:A,4-ROW())

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"PJ" wrote in message
...
Great function. If I want to invert just 3 numbers in the column and not
the whole A column how do I change the equation?

"Bob Phillips" wrote:

=IF(COUNTA(A:A)-ROW()+1<1,"",INDEX(A:A,COUNTA(A:A)-ROW()+1))

and copy down.

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"PJ" wrote in message
...
How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1








  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 84
Default Invert excel data

You could also write some code with Visual

Option Explicit
Public Sub InvertedData()
Dim i As Long 'counter
Dim ws As Long 'the number of the worksheet
Dim first As Long 'the first cell in which data starts
Dim last As Long 'the last cell of the data column
first = 2 'Suppose data starts at row two
last = 10 'Suppose data ends at row 10
ws = 1 'Suppose data is stored in worksheet 1
With Worksheets(ws)
For i = first To last
.Cells(i, 2) = .Cells(last - i + first, 1)
Next i
End With
End Sub

--
Carlos


"PJ" wrote:

How can I paste data in inverse column order. From col A to col B

Col A Col B Paste in B
1 4
2 3
3 2
4 1

Reply
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
sorting 2 colums of numbers and incremening them down blk&wht Excel Discussion (Misc queries) 10 October 9th 06 10:12 PM
Inputting data to one worksheet for it effect another daedalus1 Excel Discussion (Misc queries) 1 June 25th 06 04:39 PM
ranking query JaimeTimbrell Excel Discussion (Misc queries) 2 February 16th 06 08:09 AM
Inserting a new line when external data changes Rental Man Excel Discussion (Misc queries) 0 January 11th 06 07:05 PM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM


All times are GMT +1. The time now is 12:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"