Apologies if similar questions have been posted before. I have looked all over for a solution and can't see the wood for the trees
I have a workbook which contains a Summary Sheet, calculator and a worksheet for each month of the year.
There is a Userform which is activated by pressing a button on the Summary Sheet.
The Userform contains a ListBox (ListBox1) and a Run KPI button. The listbox allows the user to select any month from the list. When the button is pressed it will open up a separate report sheet and copy the data into the correct month's sheet (using the Listbox selection). It should then insert formulas into the Calculator sheet which reference to the correct month's worksheet.
I am currently stuck on the formula as it doesn't seem to work the way I need:
The Calculator has various cells which must be calculated using the month's worksheet but the same column reference each time:
e.g. Cell B2 on the Calculator should have the following formula:
"=COUNTIF(October!C:C,">=14")
with the October part of the formula being whatever has been selected in the Listbox.
When I use vba I am replacing October with ListBox1 but this either throws up an error or tries to get me to open a workbook called ListBox1.
Unfortunately, I am unable to supply a copy of the workbook as it contains personal information about our customers.
Thank you for any help and apologies if this is a simple one.
Bookmarks