LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 154
Default REARRANGEMENT OF CELL VALUES !!


Hi -

I have data in Range("A:A:). All the cells contain data contiguously
(i.e there is/are not empty cells in between).

However, some of the data in some cells are bound to be deleted. I need
a macro that will loop through the range and if there are any empty
cells, the macro will re-arrange the data (by moving them up) so that
empty cells will only be below the last entry.

Example: If the macro sees empty cells somewhere like:
A1:546
A2:908566
A3: <Empty Cell
A4:57886
A5:43
A6:<Empty Cell
A7:<Empty Cell
A8:89432
...

Then the macro will re-arrange by moving the data up as:
A1:546
A2:908566
A3:57886
A4:43
A5:89432
A6:<Empty Cell
A7:<Empty Cell
A8:<Empty Cell
...

SO IN THE END: All empty cells will be BELOW the last entry.I could
easily solve this problem by just looking for empty cells and deleting
the entirerow, but that is not an option, because I will lose data in
other columns of the sheet.

Any help will be appreciated.

Thanks
Jay Dean



*** Sent via Developersdex http://www.developersdex.com ***
 
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
Copy values from a cell based on values of another cell Spence10169 Excel Discussion (Misc queries) 4 January 13th 09 10:01 AM
How to assign values to a cell based on values in another cell? Joao Lopes Excel Worksheet Functions 1 December 5th 07 09:02 PM
data rearrangement...??? nkk Excel Programming 1 April 12th 06 10:27 PM
Rearrangement of reported data JMay Excel Programming 2 May 7th 04 12:16 AM
Search/Filter to find values in another range based on two cell values Andy Excel Programming 2 April 29th 04 04:08 PM


All times are GMT +1. The time now is 07:38 PM.

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

About Us

"It's about Microsoft Excel"