Deleting "most" of row
Hi all,
With Worksheets("Data") Set Rng = .Cells(.Rows.Count, "A").End(xlUp) With Rng .EntireRow.ClearContents How would I change the above code so that the data in column A is not deleted but everything else on the row is deleted? TIA, Robbyn |
Deleting "most" of row
With Worksheets("Data")
Set Rng = .Cells(.Rows.Count, "A").End(xlUp) Set Rng = Rng(1, 2).Resize(1, .Columns.Count - 1) Rng.ClearContents End With -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Robbyn" wrote in message Hi all, With Worksheets("Data") Set Rng = .Cells(.Rows.Count, "A").End(xlUp) With Rng .EntireRow.ClearContents How would I change the above code so that the data in column A is not deleted but everything else on the row is deleted? TIA, Robbyn |
Deleting "most" of row
try
With Worksheets("Data") lr=.Cells(.Rows.Count, "A").End(xlUp) ..range(.cells(lr,2),.cells(lr,"iv")).ClearContent s end with -- Don Guillett SalesAid Software "Robbyn" wrote in message ... Hi all, With Worksheets("Data") Set Rng = .Cells(.Rows.Count, "A").End(xlUp) With Rng .EntireRow.ClearContents How would I change the above code so that the data in column A is not deleted but everything else on the row is deleted? TIA, Robbyn |
Deleting "most" of row
Thank you both! I tried both examples with a little tweaking and they were
successes! "Robbyn" wrote: Hi all, With Worksheets("Data") Set Rng = .Cells(.Rows.Count, "A").End(xlUp) With Rng .EntireRow.ClearContents How would I change the above code so that the data in column A is not deleted but everything else on the row is deleted? TIA, Robbyn |
All times are GMT +1. The time now is 06:00 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com