#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default condition

I am creating a macro to calculate sum of the cells in
column. In a cells itself I have IF formulas which
calculate value based on other cells in the row and
display result if it is greater than 0 or display nothing
("") if it is 0. I am receiving error when the value in
the cell is 0. How I can modify my macro so that it will
allow 0 and will not try to add "" to the number ?

Thanks for help.

Tony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default condition

Hi
post the relevant part of your code

--
Regards
Frank Kabel
Frankfurt, Germany


Tony wrote:
I am creating a macro to calculate sum of the cells in
column. In a cells itself I have IF formulas which
calculate value based on other cells in the row and
display result if it is greater than 0 or display nothing
("") if it is 0. I am receiving error when the value in
the cell is 0. How I can modify my macro so that it will
allow 0 and will not try to add "" to the number ?

Thanks for help.

Tony

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default condition

Hi Frank,

Thank you very much for your reply. In the meantime I have
found solution to my problem. I have added the Val before
the cell reference. It looks now like

... + Val(Worksheets("Entry").Cells(I, 7))

and it works exactly the way I wanted.

Regards,

Tony

-----Original Message-----
Hi
post the relevant part of your code

--
Regards
Frank Kabel
Frankfurt, Germany


Tony wrote:
I am creating a macro to calculate sum of the cells in
column. In a cells itself I have IF formulas which
calculate value based on other cells in the row and
display result if it is greater than 0 or display

nothing
("") if it is 0. I am receiving error when the value in
the cell is 0. How I can modify my macro so that it will
allow 0 and will not try to add "" to the number ?

Thanks for help.

Tony

.

Reply
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
SUM Condition Adam Bradley Excel Worksheet Functions 4 June 8th 09 04:16 PM
Condition Erlang Excel Discussion (Misc queries) 2 July 23rd 08 12:44 AM
lookup with multiple condition, but one condition to satisfy is en Eddy Stan Excel Worksheet Functions 2 October 27th 07 02:06 PM
Combine an OR condition with an AND condition Will Excel Discussion (Misc queries) 1 April 6th 07 03:52 PM
Condition 1 overules condition 2? Bultgren Excel Worksheet Functions 2 January 20th 06 12:29 PM


All times are GMT +1. The time now is 09:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"