Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JH JH is offline
external usenet poster
 
Posts: 64
Default delete values in cells

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default delete values in cells

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 41
Default delete values in cells

JH wrote:
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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default delete values in cells

Maybe Cells(i, 1).ClearContents?

Regards,
Bernd
  #5   Report Post  
Posted to microsoft.public.excel.programming
JH JH is offline
external usenet poster
 
Posts: 64
Default delete values in cells

Thanks everybody
Jan


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to delete the values in some cells, Skip[_2_] Excel Worksheet Functions 5 November 6th 09 07:26 PM
how to delete specific values in cells [email protected] New Users to Excel 1 August 29th 08 02:31 PM
delete the test values, but do not delete the formulas kathy Excel Discussion (Misc queries) 1 February 21st 07 07:03 PM
Macro do delete values in cells Esrei Excel Discussion (Misc queries) 1 April 14th 05 04:01 PM
delete values in several cells without deleting the formulas dranreb Excel Discussion (Misc queries) 4 December 9th 04 01:15 AM


All times are GMT +1. The time now is 10:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"