Hello
I download a report in Excel, where the following value which explains the report filters, is placed in a single cell's value. This cell does move around a little on the report.
Firstly I need to search the report range A1:K10 to find this cell that contains the filters, by looking up either "Item:", or "Location Filter:", or "Period:" or "Sale:". Then secondly use that cell's value to split (and trim) this into ~7 seperate variables to use elsewhere in the VBA code.
e.g A4.Value = "Item: Location Filter: Store 1, Store 2, Store 3, Period: 13.08.2024..30.08.2024 Sale: 1234"
~7 variables then
ReportItem = ""
ReportLocation1 = "Store 1"
ReportLocation2 = "Store 2"
ReportLocation3 = "Store 3"
ReportStartDate = "13/08/2024
ReportEndDate = "30/08/2024
ReportSale = "1234"
The list of stores is usually 1 or 2, but can be 5+. Is there any clever way to handle this by looking at the cell's value?
Can someone please help me as I am slowly getting myself into a hole on this one!?
Thanks
Jay
I download a report in Excel, where the following value which explains the report filters, is placed in a single cell's value. This cell does move around a little on the report.
Firstly I need to search the report range A1:K10 to find this cell that contains the filters, by looking up either "Item:", or "Location Filter:", or "Period:" or "Sale:". Then secondly use that cell's value to split (and trim) this into ~7 seperate variables to use elsewhere in the VBA code.
e.g A4.Value = "Item: Location Filter: Store 1, Store 2, Store 3, Period: 13.08.2024..30.08.2024 Sale: 1234"
~7 variables then
ReportItem = ""
ReportLocation1 = "Store 1"
ReportLocation2 = "Store 2"
ReportLocation3 = "Store 3"
ReportStartDate = "13/08/2024
ReportEndDate = "30/08/2024
ReportSale = "1234"
The list of stores is usually 1 or 2, but can be 5+. Is there any clever way to handle this by looking at the cell's value?
Can someone please help me as I am slowly getting myself into a hole on this one!?
Thanks
Jay