Update FilterAndExtractData/FilterAndExtractData.bas

This commit is contained in:
kevinowino869 2025-03-02 14:24:11 +01:00
parent c7080f0a2f
commit f0503dd266

View File

@ -1,4 +1,3 @@
Attribute VB_Name = "FilterAndExtractData"
Sub FilterAndExtractData()
Dim wsData As Worksheet, wsDash As Worksheet
Dim lastRow As Long, headerRow As Long
@ -19,7 +18,7 @@ Sub FilterAndExtractData()
countyFilter = Trim(wsDash.Range("D7").Value) ' County filter
' Clear previous results
wsDash.Range("A10:L35").ClearContents
wsDash.Range("A10:ZL100000").ClearContents
' Set filter range
Set filterRange = wsData.Range(wsData.Cells(headerRow, 1), wsData.Cells(lastRow, wsData.UsedRange.Columns.Count))