Clear Contents - Specific Cells

meledward23

New Member
Joined
Aug 2, 2016
Messages
19
So I after a copy and paste, I am trying to clear contents of specific cells.
VBA Code:
.Cells(LRow + 1, 9).EntireRow.SpecialCells(xlCellTypeConstants).clearcontents
this clears the proper row. But everything.
VBA Code:
.Cells(LRow + 1, 9).SpecialCells(xlCellTypeConstants).clearcontents
This clears my entire sheet.
So clearly I am not understanding something properly.

(Lrow 2nd to last row of a range, so I can insert before the end, so I am getting the right row when I do entire row)
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
If you use specialcells on a single cell (as in your 2nd example), it looks at the entire sheet.
Just use the code in your 1st example
 
Upvote 0

Forum statistics

Threads
1,215,052
Messages
6,122,878
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top