Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SELECTION INFORMATION NEEDED PLEASE HELP

Hello,

I need to get the information about the selection I have made with my mouse.

What I am trying to do is converting rows or columns from upside-down to
downside-up for more brief explanation 5 rows will change as
row 1 === will replace with row 5
row 2 === will replace with row 4
row 3 === will replace with row 3
row 4 === will replace with row 2
row 5 === will replace with row 1

is there any simpler solution for that???

and help will be appreciated.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default SELECTION INFORMATION NEEDED PLEASE HELP

Kaan,

Select your cells, and run the macro below.

HTH,
Bernie
Excel MVP

Sub InvertRange()
Dim myRange As Range
Set myRange = Selection

Application.ScreenUpdating = False
myRange.Cells(1).EntireColumn.Insert
Set myRange = myRange.Offset(0, -1).Resize( _
myRange.Rows.Count, myRange.Columns.Count + 1)
myRange.Select
With myRange.Columns.Item(1)
.Formula = "=ROW()"
.Value = .Value
End With
myRange.Sort myRange.Columns(1), _
xlDescending, , , , , , _
xlNo, , , xlSortColumns
myRange(1).EntireColumn.Delete
myRange(1).Select
Application.ScreenUpdating = True

End Sub


"Kaan Demirtas" wrote in message ...
Hello,

I need to get the information about the selection I have made with my mouse.

What I am trying to do is converting rows or columns from upside-down to
downside-up for more brief explanation 5 rows will change as
row 1 === will replace with row 5
row 2 === will replace with row 4
row 3 === will replace with row 3
row 4 === will replace with row 2
row 5 === will replace with row 1

is there any simpler solution for that???

and help will be appreciated.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default SELECTION INFORMATION NEEDED PLEASE HELP

I would go to the next available column and put in the numbers
1
2
3
4
5

Then I would select all the data and sort (Data=Sort) on the column
Descending.

then remove the dummy numbers.

--
Regards,
Tom Ogilvy

"Kaan Demirtas" wrote in message
...
Hello,

I need to get the information about the selection I have made with my

mouse.

What I am trying to do is converting rows or columns from upside-down to
downside-up for more brief explanation 5 rows will change as
row 1 === will replace with row 5
row 2 === will replace with row 4
row 3 === will replace with row 3
row 4 === will replace with row 2
row 5 === will replace with row 1

is there any simpler solution for that???

and help will be appreciated.




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
Pivot table cutting information of a part of the information ASR Excel Discussion (Misc queries) 1 November 5th 09 02:09 PM
Showing information according to a selection in a drop down box Callum W Excel Worksheet Functions 2 August 18th 09 01:54 PM
Limiting selection in a cell AND linking that selection to a list Lisa Excel Discussion (Misc queries) 1 July 28th 09 05:00 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Bringing additional information in with combo box selection JD Excel Worksheet Functions 1 February 24th 05 01:45 AM


All times are GMT +1. The time now is 04:00 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"