#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Cell format

You will need to modify the sheet and the range but this should be close...

Public Sub FindJustNumbers()
Dim rng As Range
Dim wks As Worksheet

Set wks = ActiveSheet
On Error Resume Next
Set rng = wks.Range("A1:D5").SpecialCells(xlCellTypeConstant s, xlNumbers)
On Error GoTo 0
If rng Is Nothing Then
MsgBox "No Numbers"
Else
rng.Select
End If
End Sub
--
HTH...

Jim Thomlinson


"Christmas May" wrote:

To all,

If you enter "965-0001" in cell A1, "2" in cell A2, "=A1+1" into cell B1 and
"=A2+1" into cell B2, "#VALUE!" in cell B1 and "3" in cell B2.

I'd like to run a macro to remove all of the cells in a long list that are
simply a number like cell A2 above, while retaining the cells that have data
like cell A1 above. However, I'm unsure how to determine the difference.

Sincerely,

Christmas May

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
Lock Cell Format - Allow copy and paste of data without format change Chris12InKC Excel Worksheet Functions 2 May 9th 23 07:42 PM
cell format - remove cell format pattern without effecting colors Bas Excel Discussion (Misc queries) 1 March 23rd 09 02:54 PM
Can cell format come from and change with reference cell format jclouse Excel Discussion (Misc queries) 1 November 29th 06 03:20 AM
Custom Cell format to mimic time format [email protected] Excel Discussion (Misc queries) 6 November 7th 06 09:17 PM
How do I copy data in single cell format to a merged cell format Paul Excel Discussion (Misc queries) 1 June 27th 05 11:00 AM


All times are GMT +1. The time now is 06:45 PM.

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"