delete values in cells

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I'd like to remove values in cells (not cells) in column A that don't
contain a 10digit number.

thanks for any suggestions

Jan
 
Hi Jan,

I'd like to remove values in cells (not cells) in column A that don't
contain a 10digit number.


try

For Each cell In Range("whatever")

If (cell.Value Mod 1000000000 = 0) Then
cell.Value = ""
End If

Next cell


Best

Markus
 
JH said:
Hello,

I'd like to remove values in cells (not cells) in column A that don't
contain a 10digit number.

thanks for any suggestions

Jan
Hi Jan

This is simple way to do it.


Sub clearcol()
For i = 1 To 100 ' 100 is the no. of rows to check, could be more
If Len(Cells(i, 1)) <> 10 Then Cells(i, 1) = ""
Next i
End Sub


HTH

Andrew Bourke
 

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