Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2007

Tip: Looking for answers? Try searching our database.

Checking For Numeric Before Computing?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PeteCresswell - 11 Jul 2007 14:39 GMT
Seems like:

    =IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,Null),Null)

Should return Null if R8C15 contains "xxx".

But it returns "#NAME?" instead.

Can anybody see what I'm doing wrong?

(I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
code)
PeteCresswell - 11 Jul 2007 14:41 GMT
> Seems like:
>
[quoted text clipped - 8 lines]
> (I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
> code)

PS: It returns the expected ".1" if R1C17=10 and R8C15=1
Ron Rosenfeld - 11 Jul 2007 14:57 GMT
>Seems like:
>
[quoted text clipped - 8 lines]
>(I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
>code)

Null is not a keyword.  It needs to be in quotes.

=IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,"Null"),"Null")

--ron
Dave Peterson - 11 Jul 2007 16:26 GMT
or maybe you wanted an empty string returned so the cell looked blank.

=IF(ISNUMBER(R8C15),IF(R8C15 > 0, R8C15/R1C17,""),"")

But don't expect that cell to be really empty--it has a formula in it.

> Seems like:
>
[quoted text clipped - 8 lines]
> (I'm pushing that "IF" statement into the cell's .FormulaR1C1 via VBA
> code)

Signature

Dave Peterson

PeteCresswell - 11 Jul 2007 19:35 GMT
> or maybe you wanted an empty string returned so the cell looked blank.

That's probably what I should be doing anyhow...

Thanks Ron.

Thanks Dave.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.