How to select specific rows of numbers from an excel sheet

choomkey

New Member
Joined
May 17, 2021
Messages
10
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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,482
Messages
5,770,351
Members
425,612
Latest member
martinijr

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