View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default More efficient code wanted

sub blankem()
range("a1:b1,g1").resize(14)=""
'OR
range("a1:b1,g1").resize(14).clearcontents
end sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"fzl2007" wrote in message
...
How do I write more condense code for the following?
I appreciate it.

.Cells(iRow + 1, "A").Value = ""
.Cells(iRow + 2, "A").Value = ""
.Cells(iRow + 3, "A").Value = ""
.Cells(iRow + 4, "A").Value = ""
.Cells(iRow + 5, "A").Value = ""
.Cells(iRow + 6, "A").Value = ""
.Cells(iRow + 7, "A").Value = ""
.Cells(iRow + 8, "A").Value = ""
.Cells(iRow + 9, "A").Value = ""
.Cells(iRow + 10, "A").Value = ""
.Cells(iRow + 11, "A").Value = ""
.Cells(iRow + 12, "A").Value = ""
.Cells(iRow + 13, "A").Value = ""
.Cells(iRow + 14, "A").Value = ""

.Cells(iRow + 1, "B").Value = ""
.Cells(iRow + 2, "B").Value = ""
.Cells(iRow + 3, "B").Value = ""
.Cells(iRow + 4, "B").Value = ""
.Cells(iRow + 5, "B").Value = ""
.Cells(iRow + 6, "B").Value = ""
.Cells(iRow + 7, "B").Value = ""
.Cells(iRow + 8, "B").Value = ""
.Cells(iRow + 9, "B").Value = ""
.Cells(iRow + 10, "B").Value = ""
.Cells(iRow + 11, "B").Value = ""
.Cells(iRow + 12, "B").Value = ""
.Cells(iRow + 13, "B").Value = ""
.Cells(iRow + 14, "B").Value = ""

.Cells(iRow + 1, "G").Value = ""
.Cells(iRow + 2, "G").Value = ""
.Cells(iRow + 3, "G").Value = ""
.Cells(iRow + 4, "G").Value = ""
.Cells(iRow + 5, "G").Value = ""
.Cells(iRow + 6, "G").Value = ""
.Cells(iRow + 7, "G").Value = ""
.Cells(iRow + 8, "G").Value = ""
.Cells(iRow + 9, "G").Value = ""
.Cells(iRow + 10, "G").Value = ""
.Cells(iRow + 11, "G").Value = ""
.Cells(iRow + 12, "G").Value = ""
.Cells(iRow + 13, "G").Value = ""
.Cells(iRow + 14, "G").Value = ""


Faye Larson