stuck with problem

suramyatyagi

New Member
Joined
Aug 22, 2017
Messages
5
2754
2785
2742
2709
73
0
2636
2719
2696.66425
2712.02986
2662.09163
2595.82745
60.5020826
0
2500.75275
2652.48813
2709
73
0
2636
2719
2696.66425
2712.02986
2662.09163
But I only want to count the absolute numbers that are above 2000 not decimals not numbers below 1000 , so the count fro this problem must be 9 .Need help in solving this

<tbody>
</tbody><colgroup><col></colgroup>
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
a
b
c
1
2754​
2
2785​
9​
3
2742​
4
2709​
5
73​
6
0​
7
2636​
8
2719​
9
2696.664​
10
2712.03​
11
2662.092​
12
2595.827​
13
60.50208​
14
0​
15
2500.753​
16
2652.488​
17
2709​
18
73​
19
0​
20
2636​
21
2719​
22
2696.664​
23
2712.03​
24
2662.092​

<tbody>
</tbody>


c2
=SUMPRODUCT((A1:A24>200)*(A1:A24-INT(A1:A24)=0))
 
Upvote 0
Hello and welcome. I think I've understand I've done this user defined function, tested it and it works.

Add a module to your VBA environment and paste this Function:

Code:
Function COUNTOVER2K(Target As Range) As Long
    Dim cell As Range
    Dim l As Long
    For Each cell In Target
        If Int(Val(cell)) = Val(cell) And Val(cell) > 2000 Then l = l + 1
    Next cell
    COUNTOVER2K = l
End Function

To use the function, assuming the data you provided is in cells A2:A24 then put this in any cell not in that range:

=COUNTOVER2K(A2:A24)

Hope this helps
 
Upvote 0

a

b

c

1

2754​

2

2785​

9​

3

2742​

4

2709​

5

73​

6

0​

7

2636​

8

2719​

9

2696.664​

10

2712.03​

11

2662.092​

12

2595.827​

13

60.50208​

14

0​

15

2500.753​

16

2652.488​

17

2709​

18

73​

19

0​

20

2636​

21

2719​

22

2696.664​

23

2712.03​

24

2662.092​

<tbody>
</tbody>


c2
=SUMPRODUCT((A1:A24>200)*(A1:A24-INT(A1:A24)=0))

Thanks a lot really appreciate it :):):):)
 
Upvote 0
Hello and welcome. I think I've understand I've done this user defined function, tested it and it works.

Add a module to your VBA environment and paste this Function:

Code:
Function COUNTOVER2K(Target As Range) As Long
    Dim cell As Range
    Dim l As Long
    For Each cell In Target
        If Int(Val(cell)) = Val(cell) And Val(cell) > 2000 Then l = l + 1
    Next cell
    COUNTOVER2K = l
End Function

To use the function, assuming the data you provided is in cells A2:A24 then put this in any cell not in that range:

=COUNTOVER2K(A2:A24)

Hope this helps
Thanks a lot really appreciate it :):):):)
 
Upvote 0
for me the earlier formula worked perfectly fine , thanks again . Can you help me out with the logic behind the formula which you used earlier . It will really help me out in future:)
 
Upvote 0

Forum statistics

Threads
1,214,392
Messages
6,119,257
Members
448,880
Latest member
aveternik

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