Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I have my project inventory sheet working other than a divide by 0 error #DIV/0! when they don't enter a value in the quantity field.
Is it possible to move the cursor to the quantity field and display a message with this error? Or, is it time to start learning VB? This is the code that calculates the sales margin and gives the error =IF((G4+H4)0,(I4-F4)/I4,0) The quantity cell is D4 Thanks for your help, Les |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
As stated your problem would require VBA. And if you want this to happen on mouse over (when your mouse is over the cell only) that is more of an issue. However, without vba you could modify the formula =IF((G4+H4)0,(I4-F4)/I4,"my error message") -- Thanks, Shane Devenshire "Les Linton" wrote: I have my project inventory sheet working other than a divide by 0 error #DIV/0! when they don't enter a value in the quantity field. Is it possible to move the cursor to the quantity field and display a message with this error? Or, is it time to start learning VB? This is the code that calculates the sales margin and gives the error =IF((G4+H4)0,(I4-F4)/I4,0) The quantity cell is D4 Thanks for your help, Les -- Les Linton |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How does D4 come into play? Or is it a dependent of I4?
Looks to me like the error would arise when I4 is empty or 0 Try this to give a message if I4 is empty. =IF(I4="","There is no entry in I4",IF((G4+H4)0,(I4-F4)/I4,0)) Gord Dibben MS Excel MVP On Wed, 26 Sep 2007 19:07:28 +0100, Les Linton wrote: I have my project inventory sheet working other than a divide by 0 error #DIV/0! when they don't enter a value in the quantity field. Is it possible to move the cursor to the quantity field and display a message with this error? Or, is it time to start learning VB? This is the code that calculates the sales margin and gives the error =IF((G4+H4)0,(I4-F4)/I4,0) The quantity cell is D4 Thanks for your help, Les |
#4
![]() |
|||
|
|||
![]()
Thanks to both. Gord, you are correct the error does come because the result of the calculation at I4 is 0. This occurs due to no entry in D4.
Thanks again, Les Quote:
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
move cursor on one sheet moves cursor on all sheets | Excel Discussion (Misc queries) | |||
How do I get tab to move the cursor one cell over rather than 8? | Excel Worksheet Functions | |||
Several questions about move cursor | Excel Discussion (Misc queries) | |||
Move cursor to next row | Excel Discussion (Misc queries) | |||
Move Cursor to A1 | Excel Discussion (Misc queries) |