Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Move/Shift cells left or right in a row

I would like to be able to move a selected number of cells in a row
based on a user entered value. If they enter -5, the cells values
would be moved 5 columns left of the first non-blank/non-zero cell. If
5, the values would be moved over to the right 5 spaces.

I don't know excel that well so I started by creating a macro to
generate code but the macro only recorded the first half of what I
did(the cut). After awhile, I tried a different computer and it
recorded the cut and paste but the formula in the destination column
changed from "sum($b$2*$b$3)" to "sum(#REF*$b$3)". The
formula($e$2*$e$3) in the source column also changed( to $b$2*$e$3) to
point to the new location of the data. Why did this occur?

How do I get the cells to move their values over by n spaces?

Thanks in advance.

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
Auto-ID and Delete/left shift cells when a cell contains text? IndyToothDoc Excel Discussion (Misc queries) 0 June 29th 09 06:06 PM
How can I shift my data line to the left? bmeril Charts and Charting in Excel 1 January 19th 06 07:59 PM
Shift data to left Steph[_3_] Excel Programming 4 April 13th 05 03:58 AM
VBA - Left Shift to be Activated when Sheet is selected. BradWarr Excel Programming 1 June 22nd 04 01:25 PM
Delete a blank cell and shift left jrb[_2_] Excel Programming 1 February 26th 04 09:52 PM


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

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"