Sum total help

  • Thread starter Thread starter S
  • Start date Start date
S

S

I have used `sum total` for cells A11 to A269 the total being in A271

The actual total should be 36 but it keeps showing zero. I have gone to
format cell and formatted as number but still no joy.


Any ideas what is wrong.Why it wont add?
thanks
 
Maybe you don't have numbers. Try this

Sub fixmynums()
On Error Resume Next
For Each C In Selection 'Range("a11:a269")
C.NumberFormat = "General"
C.Value = CDbl(C)
Next
End Sub
 
Not sure what you mean by "Maybe you don't have numbers."
I have formatted all the cells to numbers, also tried general and also text.

What you have given me below I don`t really want to go in there as I will
screw up, out my depth, from my past experience.

I am hoping that maybe by formatting cells or checking unchecking something
I can get this to total properly.
 
Have emailed to you.

Thanks

Don Guillett said:
If desired, send your workbook to my address below

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(e-mail address removed)
 
Changing the format doesn't change the value in the cell.

You have to do more.
One way is to run that macro that Don wrote for you.
Another way is to edit|copy an empty cell
select the range to fix
edit|paste special|check add and values
 
Sub fixmynums()
Application.ScreenUpdating = False

lr = Cells.SpecialCells(xlCellTypeLastCell).Row
On Error Resume Next
For Each c In Range("a1:q" & lr)
If Trim(Len(c)) > 0 And c.HasFormula = False Then
c.NumberFormat = "General"
c.Value = CDbl(c)
End If
Next

Application.ScreenUpdating = True
End Sub
 
Don,

Many thanks for your help and time, especially with the macro, it adds up
properly now.

regards
 
Back
Top