Capping % value based on total of target cell plus another cell

nene24713

New Member
Joined
Jul 7, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
The following code is for F39
=IF(OR($F$4="None",$F$4="Overnight Charging"),0%,MIN((0.8-F38),0.9,$F$17*0.9/F35-F38))

This works fine so long as the annual consumption (F17) is less than, or not much more than the total annual output (F35) (see first table). But when the annual consumption is a lot higher I get the issue shown in table 2.

Cells F38:F40 need to add up to 100% and F38:F39 can be no more than 90% combined.

Is there something I can add to the code above to prevent cells F38:F39 going above 90%?

Thank you

Annual Consumption (kWh)4000.00F17
Standard Rate (pence per kWh)0.17000
Peak Rate (pence per kWh - if applicable)
Off-Peak Rate (pence per kWh - if applicable)
Number of Off-Peak Hours
Average Unit Rate
Export Tariff0.030
Number of Arrays1Array 1
Number of Modules10
Module Power (Wp)370
Total Installed Cap (kWp)3.70
Orientation (° from south)50
Inclination (° from horizontal)30
Irradiance (kk)903
Shading Factor (e.g. 0.94)0.95
Annual Output3174.05F35
Total Annual Output3174.05
Solar Self-Consumption47.26%F38
Battery Self-Consumption32.74%F39
Export20.00%F40
Annual Consumption (kWh)10000.00F17
Standard Rate (pence per kWh)0.17000
Peak Rate (pence per kWh - if applicable)
Off-Peak Rate (pence per kWh - if applicable)
Number of Off-Peak Hours
Average Unit Rate
Export Tariff0.030
Number of Arrays1Array 1
Number of Modules10
Module Power (Wp)370
Total Installed Cap (kWp)3.70
Orientation (° from south)50
Inclination (° from horizontal)30
Irradiance (kk)903
Shading Factor (e.g. 0.94)0.95
Annual Output3174.05F35
Total Annual Output3174.05
Solar Self-Consumption90.00%F38
Battery Self-Consumption-10.00%F39
Export20.00%F40
 
I've managed to fix this using =MIN(0.9-F38)*IF(OR($F$4="None",$F$4="Overnight Charging"),0%,MIN((0.8-F38),0.9,$F$17*0.9/F35-F38))
 
Upvote 0
Solution

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