I am trying to have the following calculate only if cell M:M is not blank.
=SUM(W192*2+W193*Q3)
The above works, but I need to add a function to only SUM if cell M:M has data.
Thank You
I am trying to have the following calculate only if cell M:M is not blank.
=SUM(W192*2+W193*Q3)
The above works, but I need to add a function to only SUM if cell M:M has data.
Thank You
Last edited by cdxjones; 04-04-2017 at 04:13 PM.
Try this:
Formula:![]()
Please Login or Register to view this content.
Jeff
| | |·| |·| |·| |·| | |:| | |·| |·|
Read the rules
Use code tags to [code]enclose your code![/code]
M:M is not a cell, it is a range, a cell would be M1.
Now, having said that, do you need to test to see if ALL of M is blank, or just a certain cell?
Also, you dont really need to use SUM like that, this should also work...
=W192*2+W193*Q3
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Thank You, This worked...
Ford made a good point. I didn't really read the formula. SUM is superfluous in this case (though does not cause an error).
Formula:![]()
Please Login or Register to view this content.
Thanks 6![]()
I thought this was working... However the formula is calculating the first part of the calculation in BOLD below when range M:M is empty.
=IF(COUNTA(M:M)=0,"",W192*2+W193*Q3
Any thoughts?
This implies W193 and Q3 are zero AND M:M is not empty i.e.a cell with a space will NOT be "Blank".
Do "Clear Contents" on column M.
It is clear, let me clean this up and upload what I am looking at...
OK, will wait for your file![]()
Uploaded...
Thanks
Column M has data in rows 2 and 3: so I think formula should be ..
=IF(M3="","",$W$192*2+$W$193*O3)
Copy down
Edited to "fix" cells
Last edited by JohnTopley; 04-04-2017 at 04:10 PM.
That was it... Did not catch that...
Thank You...
M also has - in a bunch of cells, so they are not blank either.
We come back to what I was getting to in post #3![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks