Extract Row if Dynamic Cell Range is not Empty

GuardianEnzo

New Member
Joined
Jun 27, 2017
Messages
11
I've been tasked with creating functionality in our existing expense reports which will let us filter by months. The problem I am facing is the way the current expense report is formatted.

TxID | Project Name | Vendor | Description| Apr | May | June | July | .....

On a different worksheet I have created called "Expense Report" I have recreated the column headings for everything up to the months. At that point I have a function which takes an user input and spits out a number of columns based on the months (IE If I enter Feb as start and July as End, it will create Columns from Feb to July)

Code:
Columns(25).Resize(, Range("S4").Value - Range("R4").Value + 1).Insert   
    For Cnt = Range("R4").Value To Range("S4").Value
     Range("X15").Offset(, Col).Value = MonthName(Cnt)
    Col = Col + 1
    Next Cnt

'Thanks to Fluff !

What I am trying to figure out is how to create a function which will take the user inputted months, search the expense database if those specific months(columns) have input, and extract those specific rows.

Any help/hints would be greatly appreciated!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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