I currently have 2 worksheets in my excel file.
The first sheet is known as the Summary page, which displays an summary result of the second sheet.
The secon
You can use the XLM/Range Name workaround for this and not VBA if you prefer
=RIGHT(GET.WORKBOOK(1),LEN(GET.WORKBOOK(1))-FIND("]",GET.WORKBOOK(1)))
=INDEX(wshNames,COUNTA(wshNames)+RAND()*0)
This formula says look at all the sheets, then return the last (using the COUNTA). The RAND()*0)
portion ensures that the formula is volatile and updates when Excel does
If you do use VBA you will need to ensure your GETLASTWSNAME
function is volatile, i.e. it gets updated when changes occur.
=COUNTIF(INDIRECT(GETLASTWSNAME() & "!A2:A7"),"Apple")