why is this not adding and instead giving me a 0???

San Antonio Heat

Active Member
Joined
Oct 10, 2003
Messages
333
Office Version
  1. 2019
Platform
  1. Windows
=SUM(F2,J2,N2,T2,V2,X2,Y2) I want to add these and get the total in cell AB2 but everytime I try it I get a 0, can someone tell me why?
nba.xls
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
1CostGuardsTeamFG's3'sFT'sRbd***StlBlckPoints
210AllenIversonPHI2143.79.924.939.71.44.630.97.610.175.80.83.03.86.14.32.90.12.028.90
38RayAllenSEA533.08.819.445.43.08.236.64.25.084.01.23.44.65.22.81.20.21.424.8
48TracyMcGradyORL3239.38.621.141.02.16.332.85.06.181.11.35.26.55.93.01.20.82.024.3
58BaronDavisNO3340.98.622.138.93.09.431.73.45.363.11.03.24.28.43.02.60.52.723.6
68PaulPierceBOS3438.57.818.941.51.64.633.86.07.383.01.06.37.35.84.31.60.82.723.3
salaries
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
The cells are probably formatted as text. You can confirm this by clicking in an empty cell and typing =ISTEXT(F2). If it says TRUE then the cells are text and you'll need to convert them to numerical values before any SUM formulas will work. One way of doing this is this:-

  1. Type 1 in a blank cell.
  2. Select all the range you want to convert.
  3. Press F5 and click Special. Selecyt Constants in the Go To Special dialog box.
  4. Click Edit, Paste Special and choose Values in the Paste section and Multiply in the Operation section.
  5. Click OK. Voila!
 
Upvote 0
The cells are probably formatted as text. You can confirm this by clicking in an empty cell and typing =ISTEXT(F2). If it says TRUE then the cells are text and you'll need to convert them to numerical values before any SUM formulas will work. One way of doing this is this:-

  1. Type 1 in a blank cell.
  2. Select all the range you want to convert.
  3. Press F5 and click Special. Selecyt Constants in the Go To Special dialog box.
  4. Click Edit, Paste Special and choose Values in the Paste section and Multiply in the Operation section.
  5. Click OK. Voila!

EDIT : Oops, I meant to edit my initial post but I must have done something stupid :-)
 
Upvote 0
Hi, the only thing I can think of is that Excel is seeing the values as text so isnt adding them. When you look at the value in the cell, is the value left aligned or right aligned? Cells that have their values left aligned are text, while values right aligned are numbers. It needs to be numbers.

If this is the problem you may have to delete the values and manually enter them. A quick way is by placing a 1 in a blank cell, click copy to copy its value then select the cells in the row and select paste-special then choose the Multiply option. It doesnt always work though so you may have to manually enter the values.

EDIT: Oops I see Dan has beaten me to it. err twice even :lol:
 
Upvote 0
copy from a site and pasted and yes they show a left allign, let me ttry your way. If I go back and maually enter each number then it works but that would take forever
 
Upvote 0
San Antonio Heat said:
copy from a site and pasted and yes they show a left allign, let me ttry your way. If I go back and maually enter each number then it works but that would take forever

What Dan and Parry offered as solutions shouldn't take very long.
 
Upvote 0
Hi, as the multiply method doesnt always work heres some code to do it. Just select the cells that are text then run the macro. This will be a bit quicker than doing it manually if you have a lot of cells to fix.

Code:
Sub ConvertText()
Dim c

For Each c In Selection
c.Value = Val(c.Value)
Next c
End Sub
 
Upvote 0
San Antonio Heat said:
copy from a site and pasted and yes they show a left allign, let me ttry your way. If I go back and maually enter each number then it works but that would take forever

You have probably a CHAR(160) around the numbers., which you can remove with TrimAll macro, whose code is posted in a few threads at this site.
 
Upvote 0

Forum statistics

Threads
1,224,427
Messages
6,178,588
Members
452,860
Latest member
jroberts02

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