Only calculate if a cell has an X

mrkris1982

Active Member
Joined
Apr 16, 2009
Messages
407
I have a chart that is populated, collecting data from each month of 2017 and I'd like to reuse this for 2018, but need to modify to cut down on the work.

AppMonth
Expected Uptime

<tbody>
</tbody>
DowntimeTotal Uptime
xApp1Jan737:15:0010:00:00727:15:00
xApp2Jan744:00:004:44:00740:00:00
App1Feb
465:00:00

<tbody>
</tbody>
5:00:00460:00:00
App2Feb
558:00:00

<tbody>
</tbody>
8:00:00550:00:00
App3Feb
651:00:00

<tbody>
</tbody>
1:00:00650:00:00

<tbody>
</tbody>

In another section, I am doing calculations for monthly totals per app, pulling from the chart above

MonthApp 1 Total UptimeApp 2 Total Uptime
Jan727:15:00740:00:00
Feb460:00:00550:00:00
March465:00:00548:00:00
Actual uptime total=SUM(D2:D13)
Expected Uptime Totalxxxxxxxxxxxx
Percentage Up=B5/B6

<tbody>
</tbody>

for the xxxxxxxxxx I need help

In my real spreadsheet, its doing a sum
Code:
=SUM(Q3+Q21+Q39+Q57+Q75+Q93+Q111+Q129+Q147+Q165+Q183+Q201)
where Q would equal the Chart 1 > Expected Uptime column above

Id like to leave the equation exactly as it is BUT only include it in the calculation of xxxxxxxxxx if there is an x in the adjacent column A cell

This would allow me to keep the chart in tact with the calculation only caring about the expected uptime for that app if there is an x in that apps column A cell for that month.

Hard to explain, but I am willing to give anything a try if someone wants to take a crack at it.
 
Last edited:

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You don't SUM.
This can be replaced with this

=Q3+Q21+Q39+Q57+Q75+Q93+Q111+Q129+Q147+Q165+Q183+Q201
 
Upvote 0
Try:

=SUM(IF(MOD(ROW(Q3:Q201),18)=3,IF(A3:A201="x",Q3:Q201)))

confirmed with Control+Shift+Enter
 
Upvote 0
Eric W: I tried your suggestion and the cell results in a value of 0:00:00 even after placing an x in a couple cells (A3 and A4) for the first 2 apps. The result should be 496:00:00 for App 1 and 737:15:00 for App 2 in the real workbook.
 
Upvote 0

Forum statistics

Threads
1,215,261
Messages
6,123,942
Members
449,134
Latest member
NickWBA

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top