Numbers greater than a certain value

Herbiec09

Active Member
Joined
Aug 29, 2006
Messages
250
Hi All,

I am looking for a function that can look down a list of values and return all the values greater than a certain number. I would like to vary the number I am comparing with using a drop down menu, so I am not looking to use the advanced filter, but an actual formula.

Can anyone assist.

Thanks

Herbert
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
try something like this.

<code>
Sub findnumbers()
Dim LR As Long
Dim i As Long
LR = Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LR
If Range("A" & i).Value > 5 Then
Range("B" & i).Value = Range("A" & i).Value
End If
Next i
End Sub
<code>

I just tested it and it seems to give you want you want. you can change the ranges as you see fit depending on where you want the list of numbers

to use it with a drop down, replace "If Range("A" & i).Value > 5 Then"

with
If Range("A" & i).Value > "LOCATION OF linked cell from dropdown" Then


this is easily modified code to suit what you want.

hth
 
Upvote 0

Forum statistics

Threads
1,214,881
Messages
6,122,074
Members
449,064
Latest member
MattDRT

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