How to select specific rows of numbers from an excel sheet

choomkey

New Member
Joined
May 17, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello everyone
I need your help to solve another problem
I would like to select a specific file in a specific folder which contains rows of numbers
Each file contains a single sheet which has multiple rows of 10 numbers
the numbers vary between 0-80
the following code was kindly provided to select the file by pressing a form button to run the macro

Sub choomkey()
Dim Fname As String, Pth As String
Pth = "C:\MrExcel\Fluff\"
Fname = "TG" & Range("A2").Value & " " & Range("B2").Value & "E " & Range("C2").Value & "L.xlsx"
Workbooks.Open Pth & Fname
End Sub

now before I press the button I would like to select 2 numbers (between 0-80) from Cells D2 and E2
On pressing the button, the macro would then return all the rows form the selected file containing both of those numbers
many thanks for your time and expertise
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,141,204
Messages
5,704,944
Members
421,372
Latest member
Jamie11

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
Top