LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default discover format of Excel Cell using VBA

this will select cells with numbers stored as currency. (if formatted as
currency, but containing no value, it will not be selected)

Sub markCurrency()
Dim rng As Range, cell As Range
For Each cell In Selection
If VarType(cell) = vbCurrency Then
If rng Is Nothing Then
Set rng = cell
Else
Set rng = Union(rng, cell)
End If
End If
Next
rng.Select
End Sub

Select a rectangular area of cells to check and run the macro.

--
Regards,
Tom Ogilvy


"Ron Kendall" wrote:

I am trying to determine cells that contain currency amounts. Using
IsNumeric also accepts cells with text numbers such as telephone and account
numbers.

 
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
How to discover the difference Mike Blakeley Excel Worksheet Functions 6 April 14th 09 06:15 PM
Excel Auto-Format cell to email format Please Help Me Excel Discussion (Misc queries) 1 March 23rd 06 05:15 PM
discover cell causing column width no bosh Excel Programming 5 March 3rd 05 08:11 PM
i discover that i cannot scroll in each part if i simply freeze p. hhh Excel Worksheet Functions 4 December 7th 04 02:42 AM
How can I discover the FULL list of vbConstants Bob Phillips[_5_] Excel Programming 3 August 1st 03 09:30 PM


All times are GMT +1. The time now is 07:10 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"