Too tricky for me

Status
Not open for further replies.

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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Status
Not open for further replies.

Forum statistics

Threads
1,215,046
Messages
6,122,854
Members
449,096
Latest member
Erald

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