ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   simple code (https://www.excelbanter.com/excel-programming/298491-simple-code.html)

gavmer[_5_]

simple code
 
hello all,

i am after a simple code to delete the contents of cells D13-15
C19-J19 and then move to worksheet 'TEMP'....please.

I am also after a simple code that will do the above and also, delet
rows within a cell range on sheet 'TEMP' called 'pricing'

This is probably a simple task to most but i am as beginner as the
get!!

Thanks to all!!!!

--
Message posted from http://www.ExcelForum.com


JeffP[_4_]

simple code
 
I am also a newbie so I'm hesitant to give any advise around thes
MVP's!
That said, unless there is some special reason you want to do this b
writing code, why don't you just record a macro. Even if you need t
add to that, it would certainly handle the requests you mentioned.

Jeff

--
Message posted from http://www.ExcelForum.com


JE McGimpsey

simple code
 
One way:

ActiveSheet.Range("D13:D15,C19:J19").ClearContents
Sheets("TEMP").Range("pricing").Delete Shift:=xlShiftUp


In article ,
gavmer wrote:

i am after a simple code to delete the contents of cells D13-15,
C19-J19 and then move to worksheet 'TEMP'....please.

I am also after a simple code that will do the above and also, delete
rows within a cell range on sheet 'TEMP' called 'pricing'

This is probably a simple task to most but i am as beginner as they
get!!


gavmer[_6_]

simple code
 
Thanks!!!!! That was pretty much what i needed!!!!!

One prob, the range is 2 rows between 20 and 24 (so rows 21 and 22 ar
the range. Data pastes here expanding the range but when the range i
deleted, i am left with only 2 rows and no range. I would need rows 2
and 22 to remain. How is this done??????

Cheers!!!!

--
Message posted from http://www.ExcelForum.com


gavmer[_16_]

simple code
 
Hi all,

The matter has been solved. Thanks to all!!!!

Cheers!!!

--
Message posted from http://www.ExcelForum.com



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com