Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2017, 08:24 AM
LearnerExcel LearnerExcel is offline Conditional calculations Windows 7 32bit Conditional calculations Office 2003
Advanced Beginner
Conditional calculations
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default 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.
Attached Images
File Type: png If Calculation.PNG (5.9 KB, 25 views)
Reply With Quote
  #2  
Old 12-30-2017, 09:41 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is online now Conditional calculations Windows 7 64bit Conditional calculations Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

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
Reply With Quote
  #3  
Old 12-30-2017, 10:22 AM
LearnerExcel LearnerExcel is offline Conditional calculations Windows 7 32bit Conditional calculations Office 2003
Advanced Beginner
Conditional calculations
 
Join Date: Nov 2016
Posts: 81
LearnerExcel will become famous soon enoughLearnerExcel will become famous soon enough
Default

Thaks for your kind reply. It's working fine. VBA code would be more useful.
Reply With Quote
  #4  
Old 12-30-2017, 01:13 PM
NoSparks NoSparks is offline Conditional calculations Windows 7 64bit Conditional calculations Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 831
NoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really niceNoSparks is just really nice
Default

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 ?
Reply With Quote
Reply



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
Conditional calculations Calculations etobias Word 4 12-03-2015 01:36 PM
Conditional calculations 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

Other Forums: Access Forums

All times are GMT -7. The time now is 01:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft