View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Koomba Koomba is offline
external usenet poster
 
Posts: 14
Default Display Empty Cell When Using SUM formula

To all who have sent solutions, thank you. Your suggestions are helping me in
a very big way. I will always try and find my solutions before imposing on
you all.
--
Thanks from Salt Spring


"franciz" wrote:


Assuming that your Total is in F14, I simply your macro and add a total
formula
in F14. Adjust to suit yours.

Sub Clear()
'
Range("B2,B4:B13,E14").ClearContents
Range("F14").Formula = "=IF(SUM(B4:B13)=0,"""",SUM(B4:B13))"

End Sub

Regards,



"Koomba" wrote:

I am using a Custom Sales Order Template. I use a macro to clear contents
(from previous sales order). I use SUM formula in the TOTAL cell and wonder
if I can have the TOTAL cell show as empty (but leave formula intact) after
macro clears contents. I am being picky here, I know.

Here is Macro:

Sub NewSalesOrder()
'
' NewSalesOrder Macro
' Clears Sales Order for new data entry
'
' Keyboard Shortcut: Ctrl+b
'
Range("B2").Select
Selection.ClearContents
Range("B4:B13").Select
Selection.ClearContents
Range("E14").Select
Selection.ClearContents
End Sub

--
Thanks from Salt Spring