A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Macro to delete a group of CELLS



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2006, 07:50 PM posted to microsoft.public.excel.misc
external usenet poster
 
Posts: n/a
Default Macro to delete a group of CELLS

I am trying to get a macro to delete a group of cells as I parse down
through the block of instrument data, to weed out blanks or corrupt data. I
just want the macro to delete the 4 or 5 adjacent cells and move the data
block up (similar to a right click delete- which asks if you want up, right
left or entire row, etc

Sub delete()
'
' delete Macro
' Macro recorded 5/5/2006 by Paul
'
' Keyboard Shortcut: Ctrl+d
'
Range("E2378:L2378").Select
Selection.delete Shift:=xlUp
End Sub.

Only problem with recorder is it goes to a defined cell. I would like my
macro to work wherever the cursor is- not always at E:2378 to L:2378

I appreciate the help!

Thanks
Paul


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete a group of alternate cells poleary53 New Users 1 March 7th, 2006 11:05 PM
Cascade Delete with Junction Table Chris Smith General Discussion 7 January 9th, 2006 12:45 AM
ambiguous outer joins renwick Running & Setting Up Queries 3 February 22nd, 2005 01:29 PM
Syntax needed to get needed reports Frank Lueder New Users 15 January 6th, 2005 08:39 AM
Macro: How Can I Repeat Macro In Other Cells?? Cloudhopper Worksheet Functions 1 October 9th, 2003 02:34 AM


All times are GMT +1. The time now is 11:23 PM.


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