Only add a group of cells if data exists in a cell

eechristaylor

Board Regular
Joined
Oct 22, 2013
Messages
51
Office Version
  1. 365
Platform
  1. Windows
I have a data sorce where I bring a number across using INDEX and Match to bring across the data.

Data source
ABCDE
projectAdams-1Adams-2Adams-3Adams-4
1234251221
56782515

Where I need to add data:
ABCDEFG
projectScore totalFeasibility ScoreAdams-1Adams-2Admas-3Adams-4
123462525+62+5=9212+5+62=79(21+5)(max 25) +62=87
567864525+64=8915+5+64=84

So if the data pulled is not there, i.e. project 5678 for Adams-1, there does not need to be any addition.
For the cells with data we will add the Data source to the Feasibility Score first and max here can only be 25 (i was going to use MIN(C2+D2,25) as this is reflected across project 1234 for Adams-3.

Any help on how this formula look to not add when there is no data would be appreciated.
 
How about?

ABCDEFG
1projectAdams-1Adams-2Adams-3Adams-4
21234251221
356782515
4
5
6
7projectScore totalFeasibility ScoreAdams-1Adams-2Admas-3Adams-4
81234625927987??
95678645 9484??
10
Sheet1
Cell Formulas
RangeFormula
D8:E9D8=IF(B2="","",SUM($B8:$C8)+B2)
F8:F9F8=IF(D2="","",MIN(25,D2+C8)+B8)

I have assumed the projects in the two tables correspond one-to-one, i.e. no need to lookup the correct row.

The value highlighted is different to your number - perhaps you have a typo in your calculation, omitting the +5?
 
Upvote 0
How about?

ABCDEFG
1projectAdams-1Adams-2Adams-3Adams-4
21234251221
356782515
4
5
6
7projectScore totalFeasibility ScoreAdams-1Adams-2Admas-3Adams-4
81234625927987??
95678645 9484??
10
Sheet1
Cell Formulas
RangeFormula
D8:E9D8=IF(B2="","",SUM($B8:$C8)+B2)
F8:F9F8=IF(D2="","",MIN(25,D2+C8)+B8)

I have assumed the projects in the two tables correspond one-to-one, i.e. no need to lookup the correct row.

The value highlighted is different to your number - perhaps you have a typo in your calculation, omitting the +5?

I omitted the +5 due to the cell already at the max of 25. I need the same formula across all cells as there are 1300 columns across 300 rows (projects)
 
Upvote 0
I omitted the +5 due to the cell already at the max of 25. I need the same formula across all cells as there are 1300 columns across 300 rows (projects)
In that case:

D8: =IF(B2="","",MIN(25,B2+$C8)+$B8)

(The calculation you showed for D8 didn't include the 25 cap)
 
Upvote 0

Forum statistics

Threads
1,226,799
Messages
6,193,067
Members
453,773
Latest member
bclever07

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