Delete cell value in ColE based on value is ColA

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

All,
I have a work sheet with data like this

Col A___________Col B___________Col C___________Col D___________Col E
9812___________ Joe____________________________________________125.00
*blank*__________
____________________________________________125.00
*blank*__________
____________________________________________125.00
Total __________ ____________________________________________
375.00

What I want to do is delete value in Col E if the value in Col A of
the same row IS NOT = Total


Thanks
Steve
 
Dim LastRow As Long
Dim i As Long

With ActiveSheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To LastRow

If .Cells(i, "A").Value <> "Total" Then .Cells(i,
"E").ClearContents
Next i
End With


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top