Counting cells with equal number except decimal number

alexius

New Member
Joined
Apr 18, 2018
Messages
4
Hi,

I have a column of family members:

151.1
151.2
151.3
151.4

I like to see the total in the family in the next column as follows:


151.1 4
151.2
151.3
151.4

Which formulas to use ?
Thanks for your support !
Alexius
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Alexius,

Welcome to MrExcel!!

Here's one way (just change the range from A2:A10 to suit your needs):

=COUNTIFS($A$2:$A$10,">=151",$A$2:$A$10,"<152")

Regards,

Robert
 
Upvote 0
Additional option:

Book1
AB
1151.14
2151.20
3151.30
4151.40
5200.12
6200.20
Sheet1
Cell Formulas
RangeFormula
B1=SUMPRODUCT(--ISNUMBER(SEARCH(IF(RIGHT(A1,1)="1",LEFT(A1,SEARCH(".",A1,1)-1),0),$A$1:$A$6,1)))
 
Upvote 0
Additional option:
AB
1151.14
2151.20
3151.30
4151.40
5200.12
6200.20

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B1=SUMPRODUCT(--ISNUMBER(SEARCH(IF(RIGHT(A1,1)="1",LEFT(A1,SEARCH(".",A1,1)-1),0),$A$1:$A$6,1)))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Thanks, the second option is what I need !
 
Upvote 0
Hi,

I applied the formula. It works well for number 10 - 20. If I extend the range, cells with 0 (point nr .2, .3, etc) get a number. And the family size does not show correctly for cells with .1.

=SUMPRODUCT(--ISNUMBER(SEARCH(IF(RIGHT(B6,1)="1",LEFT(B6,SEARCH(".",B6,1)-1),0),$B$6:$B$50,1)))

Data base formula family size
20/04/2018
Registration
date
ID NEW VERSIONFamily Size
(calculated)
26/12/201713.16
26/12/201713.20
26/12/201713.30
26/12/201713.40
26/12/201713.50
26/12/201713.60
26/12/201714.17
26/12/201714.20
26/12/201714.30
26/12/201714.40
26/12/201714.50
26/12/201714.60
26/12/201714.70
26/12/201715.12
26/12/201715.20
26/12/201716.16
26/12/201716.20
26/12/201716.30
26/12/201716.40
26/12/201716.50
26/12/201716.60
25/12/201717.14
25/12/201717.20
25/12/201717.30
25/12/201717.40

<colgroup><col span="2"><col></colgroup><tbody>
</tbody>
25/12/201717.56
23/12/201718.18
23/12/201718.26
23/12/201718.36
23/12/201718.46
23/12/201718.56
23/12/201718.66
23/12/201718.76
23/12/201718.86
12/08/201719.15
12/08/201719.26
12/08/201719.36
12/08/201719.46
12/08/201719.56
12/08/201720.16
12/08/201720.26
12/08/201720.36
12/08/201720.46
12/08/201720.56
12/08/201720.66
12/06/201721.10
12/06/201721.26
12/06/201721.36
12/06/201721.46
12/06/201722.10
12/06/201722.26
12/06/201722.36
12/06/201722.46

<colgroup><col width="113" span="2" style="width:85pt"> <col width="113" style="width:85pt"> </colgroup><tbody>
</tbody>

Little down:
extending range to 1500
=SUMPRODUCT(--ISNUMBER(SEARCH(IF(RIGHT(B348,1)="1",LEFT(B348,SEARCH(".",B348,1)-1),0),$B$346:$B$1500,1)))


11/02/2016102.14
11/02/2016102.2165
11/02/2016102.3165
11/02/2016102.4165
11/02/2016103.12
11/02/2016103.2165
11/02/2016104.16
11/02/2016104.2165
11/02/2016104.3165
11/02/2016104.4165
11/02/2016104.5165
11/02/2016104.6165
11/02/2016105.14
11/02/2016105.2165
11/02/2016105.3165
11/02/2016105.4165
11/02/2016106.14
11/02/2016106.2165
11/02/2016106.3165
11/02/2016106.4165
11/02/2016107.14
11/02/2016107.2165
11/02/2016107.3165
11/02/2016107.4165
11/02/2016108.15
11/02/2016108.2165
11/02/2016108.3165
11/02/2016108.4165
11/02/2016108.5165

<colgroup><col width="113" span="2" style="width:85pt"> <col width="113" style="width:85pt"> </colgroup><tbody>
</tbody>


Cannot solve it :(. Appreciate help.
 
Upvote 0
check if this helps:

Book1
ABC
1RegistrationID NEW VERSION
2date
326-11-20170.17
427-11-20170.20
528-11-20170.30
629-11-20170.40
730-11-20170.50
81-12-20170.60
92-12-20170.70
103-12-20171.14
114-12-20171.20
125-12-20171.30
136-12-20171.40
147-12-20172.18
158-12-20172.20
169-12-20172.30
1710-12-20172.40
1811-12-20172.50
8212-6-201722.14
8312-6-201722.20
8412-6-201722.30
8512-6-201722.40
8611-2-2016102.14
8711-2-2016102.20
8811-2-2016102.30
8911-2-2016102.40
9011-2-2016103.12
9111-2-2016103.20
9211-2-2016104.16
9311-2-2016104.20
9411-2-2016104.30
9511-2-2016104.40
9611-2-2016104.50
9711-2-2016104.60
9811-2-2016105.14
9911-2-2016105.20
10011-2-2016105.30
10111-2-2016105.40
10211-2-2016106.14
10311-2-2016106.20
10411-2-2016106.30
10511-2-2016106.40
10611-2-2016107.14
10711-2-2016107.20
10811-2-2016107.30
10911-2-2016107.40
Sheet1
Cell Formulas
RangeFormula
C3=SUMPRODUCT(--(RIGHT(B3,1)="1")*(INT(VALUE(SUBSTITUTE($B$3:$B$114,".",",")))=INT(VALUE(SUBSTITUTE(B3,".",",")))))
 
Last edited:
Upvote 0
Here is another formula for you to consider... with it, you do not have to specify the row number for the last cell containing data as it will figure that out on its own. It also only displays the total next to the first ID and displays the empty text string ("") for all the other cells (that sure make it easier to spot the totals without all those distracting intervening zeros. Put the following formula in cell C3 and copy it down to or beyond the last data cell...

=IF(RIGHT(B3)="1",SUMPRODUCT(--(INT(INDIRECT("B3:B"&COUNT(B:B)+2))=INT(B3))),"")

Note: If you copy the formula down well past the end of your current data, you can come along later and add more data below your existing data and the formula will automatically show the totals for each new ID in Column B.
 
Last edited:
Upvote 0
Hi,

thanks your effort !!! Quite a complex formula.

However didn't get it work :(
Copied the table below and inserted the formula.
It gives a #value error, also after formatting cells as number.

If it is not too much, your advice please. Else I will insert manually.

Thanks,

Alexius


check if this helps:
ABC
1RegistrationID NEW VERSION
2date
326-11-20170.17
427-11-20170.20
528-11-20170.30
629-11-20170.40
730-11-20170.50
81-12-20170.60
92-12-20170.70
103-12-20171.14
114-12-20171.20
125-12-20171.30
136-12-20171.40
147-12-20172.18
158-12-20172.20
169-12-20172.30
1710-12-20172.40
1811-12-20172.50
8212-6-201722.14
8312-6-201722.20
8412-6-201722.30
8512-6-201722.40
8611-2-2016102.14
8711-2-2016102.20
8811-2-2016102.30
8911-2-2016102.40
9011-2-2016103.12
9111-2-2016103.20
9211-2-2016104.16
9311-2-2016104.20
9411-2-2016104.30
9511-2-2016104.40
9611-2-2016104.50
9711-2-2016104.60
9811-2-2016105.14
9911-2-2016105.20
10011-2-2016105.30
10111-2-2016105.40
10211-2-2016106.14
10311-2-2016106.20
10411-2-2016106.30
10511-2-2016106.40
10611-2-2016107.14
10711-2-2016107.20
10811-2-2016107.30
10911-2-2016107.40

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
C3=SUMPRODUCT(--(RIGHT(B3,1)="1")*(INT(VALUE(SUBSTITUTE($B$3:$B$114,".",",")))=INT(VALUE(SUBSTITUTE(B3,".",",")))))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
if you want to display the number only next to the first ID then use this

=IF(RIGHT(B1)="1",SUMPRODUCT(--(INT($B$1:$B$100)=INT(B1))),"")
 
Upvote 0

Forum statistics

Threads
1,214,649
Messages
6,120,730
Members
448,987
Latest member
marion_davis

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