Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Move contents of selected cell down one, and to the left one cell?

I am looking for a way in a macro to do the following:
1. I select a single cell (this example C3)
2. The contents of that cell are cut
3. I then want to move the data down one and to the left ( this
example B4)
4. Then paste the contents in memory to the new cell.

Also, I would like to make this macro available for any spreedsheet.
What would be the best way to set it up? I am using Excel 2003.
Thanks in advance,
Mark
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Move contents of selected cell down one, and to the left one cell?

With error trapping:

With Activecell
if .column 1 and .row < rows.count then
.cut destination:=.offset(1,-1)
end if
end with

HTH
--
AP


"Albert Einstein" a écrit dans le message de
news: ...
I am looking for a way in a macro to do the following:
1. I select a single cell (this example C3)
2. The contents of that cell are cut
3. I then want to move the data down one and to the left ( this
example B4)
4. Then paste the contents in memory to the new cell.

Also, I would like to make this macro available for any spreedsheet.
What would be the best way to set it up? I am using Excel 2003.
Thanks in advance,
Mark



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Move contents of selected cell down one, and to the left one cell?

This solution works great. Thanks so much for the help!

On Sat, 17 Jun 2006 16:48:33 +0200, "Ardus Petus"
wrote:

With error trapping:

With Activecell
if .column 1 and .row < rows.count then
.cut destination:=.offset(1,-1)
end if
end with

HTH


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Move contents of selected cell down one, and to the left one cell?

This solution worked great. I appreciate your input. Have a great day.

On Sat, 17 Jun 2006 09:32:01 -0500, "Don Guillett"
wrote:

try
ActiveCell.Cut Destination:=ActiveCell.Offset(1, -1)


Don Guillett
SalesAid Software

"Albert Einstein" wrote in message
.. .
I am looking for a way in a macro to do the following:
1. I select a single cell (this example C3)
2. The contents of that cell are cut
3. I then want to move the data down one and to the left ( this
example B4)
4. Then paste the contents in memory to the new cell.

Also, I would like to make this macro available for any spreedsheet.
What would be the best way to set it up? I am using Excel 2003.
Thanks in advance,
Mark





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
Macro to transfer contents of 'Selected' cell to alternate cell. Gryndar Excel Worksheet Functions 7 December 20th 08 09:58 PM
Macro to remove contents of cell and move all other contents up one row adw223 Excel Discussion (Misc queries) 1 July 1st 05 03:57 PM
selected cell - top left Ciara Excel Discussion (Misc queries) 1 May 25th 05 12:16 PM
Please help! Macro to change cell contents based on cell to the left Jennifer[_8_] Excel Programming 7 March 4th 04 01:06 AM
Macro to move selected cell contents to a specific column on same row Ben Johnson[_3_] Excel Programming 1 February 10th 04 08:43 PM


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