# Subtotal Function not working

#### zahidrock

##### New Member
i am trying to getting sum on filter data but when i use subtotal function that are not working on there..

### Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

#### Vidar

##### Well-known Member
It looks like your values in column D Is formatted as number (oriented to the right in cell) as they should be.
But can you check if it really is numbers and not numbers stored as text?

#### zahidrock

##### New Member
It looks like your values in column D Is formatted as number (oriented to the right in cell) as they should be.
But can you check if it really is numbers and not numbers stored as text?

Ohh!! i see that it is on text format, i have lot of cell like this can you tell me how can i convert all of them text to number?

#### Oeldere

##### Well-known Member
Code:
``````Sub TextRangeToNumbers_incolumn_D()
'Made by Datsmart 14-07-2006 on mr Excel
Dim rng As Range
Dim c As Range
'Change Column A referrence as needed
Set rng = Range("D1:D" & Range("D1500").End(xlUp).Row)
On Error Resume Next
'Cycle through each item in Rng, Trim value then add zero
For Each c In rng
If c.Value <> "" Then
Application.WorksheetFunction.Trim (c.Value)    'Trim removes any spaces
c.Value = c.Value + 0   'Adding 0 changes item to number
Else
End If
Next c
End Sub``````

#### zahidrock

##### New Member
Code:
``````Sub TextRangeToNumbers_incolumn_D()
'Made by Datsmart 14-07-2006 on mr Excel
Dim rng As Range
Dim c As Range
'Change Column A referrence as needed
Set rng = Range("D1:D" & Range("D1500").End(xlUp).Row)
On Error Resume Next
'Cycle through each item in Rng, Trim value then add zero
For Each c In rng
If c.Value <> "" Then
Application.WorksheetFunction.Trim (c.Value)    'Trim removes any spaces
c.Value = c.Value + 0   'Adding 0 changes item to number
Else
End If
Next c
End Sub``````

I have already done this with another system.. thanks mate..

Replies
3
Views
38
Replies
2
Views
189
Replies
2
Views
298
Replies
3
Views
234
Replies
1
Views
218

1,190,677
Messages
5,982,214
Members
439,769
Latest member
trungminh2802

### 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.

### Which adblocker are you using?

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

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