Sum a row where cells contain text and numbers

dbarnes

New Member
Joined
Oct 19, 2006
Messages
13
I am trying to "sum" a row with the following data


A1 has 20gb
B1 has 23gb
C1 is blank
D1 is blank
E1 is the sum of the entire row

in the "E1" Cell I have the following formula to calculate /w text the sum for the row
=SUM(VALUE(LEFT(C4:M4,LEN(C4:M4)-2)))

This works fine if I do not have any blank cells in my row; however, if there are blank cells, I get a "#VALUE!" in cell E1.

How can I calculate a row where the cells contain a mix of numbers and text as well as some cells being blank?

Thanks!
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Is your text always "gb"?

If so perhaps you can just format the cells as

0"gb" and then put 20 in A1, 23 in B1 and just use

=SUM(A1:D1)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,803
Members
449,048
Latest member
greyangel23

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