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)
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!
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!