LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default IsNumber question

To everyone how took the time my Thanks. It turns out your ideas were good,
it was me. D3 should have been F3 and for the waste of time I am sorry. I
think I will step away and take a break for awhile


"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
i just tried it and it worked for me. i put a date in a1, 9/20/05
i put your formula in d3
when i entered a 1 in c3, it formatted d9:f9 in green.

did you put the code on the sheet1 or in a standard module? right click
sheet1, choose view code and paste the code there


if, i'm missing something, let me know
--


Gary


"Patrick Simonds" wrote in message
...
It does not seem to work.

There is a formula in cell D3 =IF(C3=0,IF(WEEKDAY($A$1)=2,$A$1),C3+1)
which returns a number (to be more exact, it returns a date, and cell
formatting returns the day number 1, 2, 3, ...15, 16 ect).

The IsNumber seems to return a false because no color is applied to the
cell. I tried swapping the color lines and then it would always change
the cell color.





"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
norman:

i am trying to learn about functions. i came up with this. would this
work correctly?


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("d9:f9")
If Application.IsNumber(Range("d3")) Then

.Interior.ColorIndex = 35
Else
.Interior.ColorIndex = 0

End If
End With
End Sub

--


Gary


"Norman Jones" wrote in message
...
Hi Patrick,

"Patrick Simonds" wrote in message
...
I need a formula which will look at cell D3, and if the formula has
returned a number then execute the following code:

Range("D9:F9").Select
Selection.Interior.ColorIndex = 35

A formula cannot change the format of another cell.

If you want to use VBA, try:

'============
Public Sub aTester()
Dim rng As Range

Set rng = Selection

With rng.Interior
If Application.IsNumber(Range("D3")) Then
.ColorIndex = 35
Else
.ColorIndex = 0
End If
End With

End Sub
'<<============


---
Regards,
Norman









 
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
ISNUMBER Arceedee Excel Discussion (Misc queries) 2 January 14th 09 05:09 AM
ISNUMBER QUESTION doyree Excel Discussion (Misc queries) 8 February 5th 08 03:54 AM
ISNUMBER Tanya Excel Worksheet Functions 5 December 6th 07 04:45 PM
ISNUMBER RJJ Excel Worksheet Functions 8 January 4th 06 11:29 PM
ISNUMBER Brady Snow Excel Programming 5 February 26th 04 05:39 AM


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