#1
|
|||
|
|||
Conditional calculations
How can I write a conditional SUM formula to get these totals. If A2 has some value then it should SUM the values as =SUM(A2*C2) if A2 has "0" then it should calculate SUM as =SUM(B2*C2). What is the code for this one, please. |
#2
|
||||
|
||||
A2*C2 is a product. Why would you want to sum a product?
In your example the SUM function is not necessary try =If(A2,A2*C2,B2*C2) As you have posted in the programming section, do you need a VBA solution?
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
#3
|
|||
|
|||
Thaks for your kind reply. It's working fine. VBA code would be more useful.
|
#4
|
|||
|
|||
I can give you a VBA solution but you'll need to supply more information, like what you have in mind to trigger the macro ?
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculations | etobias | Word | 2 | 11-09-2016 10:14 AM |
Calculations | etobias | Word | 1 | 01-08-2016 01:50 PM |
Calculations | etobias | Word | 4 | 12-03-2015 01:36 PM |
Table Calculations, VBA | SuzeG | Word VBA | 7 | 12-15-2013 07:12 PM |
How to do Calculations In a Text Box? | SteveF | Word | 4 | 09-27-2013 08:34 AM |