[Solved] Add value in col unless empty

Discuss the spreadsheet application
Post Reply
swmwshrk
Posts: 22
Joined: Fri Aug 15, 2014 3:56 am

[Solved] Add value in col unless empty

Post by swmwshrk »

I need a formula that will add the values in cells D9:D11 if the cell contains a value. If the cell is empty Then I need the value in column c same row to be used instead.

Column C contains # of hours scheduled
Column D contains # of hours used.

So if D9:D14 contain a value, and D15:D17 are empty I want a formula that will do this,,....
=sum(D9:D14+C15:C17)

But if I input a value into D15 i want the value to update to....
=sum(D9:D15+C16:C17)

Thanks
Last edited by swmwshrk on Sat Jul 20, 2019 1:08 am, edited 2 times in total.
I am very new to excel/calc. What I do know so far is self taught and very limited, I still think formulas are a form of black magic.Please give me step by step instructions, and explain abbreviations. Thank you for your help

Win 7 pro Open Office 4.1.3
FJCC
Moderator
Posts: 9280
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Need formula to add value in col d unless empty then use

Post by FJCC »

Try

Code: Select all

=SUMPRODUCT(ISBLANK(D9:D17) * C9:C17) +SUM(D9:D17)
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
swmwshrk
Posts: 22
Joined: Fri Aug 15, 2014 3:56 am

Re: Need formula to add value in col d unless empty then use

Post by swmwshrk »

That did exactly what I needed. Thank you.
I am very new to excel/calc. What I do know so far is self taught and very limited, I still think formulas are a form of black magic.Please give me step by step instructions, and explain abbreviations. Thank you for your help

Win 7 pro Open Office 4.1.3
Post Reply