KentishTim
New member
- Joined
- Oct 30, 2024
- Messages
- 4
- Reaction score
- 0
- Points
- 1
- Excel Version(s)
- 2016
Hi all, first time here, complete amateur. I can do some VBA but I would like to do this by formula if possible.
My date formats below are yyyy-mm-dd
I am trying to do the following:
Sheet 1:
Column A: a user selects a customer from a drop down list of customers, so customer1, customer2...etc,. ,The first entry is in A1.
Column B: the user enters a date in column B for when an item was sent to the customer selected in A, so B1 is the date an item was sent.
Sheet 2:
I have 5 date ranges so
Column A Column B Column C
A1 Customer1 Start date 1 End date 1
Start date 2 End date 2
Start date 3 End date 3
Start date 4 End date 4
Start date 5 End date 5
Range of start dates is B1:B5 and range of end dates is C1:C5
A8: Customer2 Start date 1 End date 1
Start date 2 End date 2
Start date 3 End date 3
Start date 4 End date 4
Start date 5 End date 5
Range of start dates is B8:B12 and range of end dates is C8:C12
Each date range is 1 year from start date.
The start dates 1 through 5 are never likely to be the same for each customer as this relies on each of them signing and returning a document.
Equally there could be gaps or overlap between the ranges for a customer
e.g. Start date 1 = 2024-05-12 end date by default is 2025-05-12; there is then a delay before the customer signs their next paperwork.
Start date 2 = 2025-05-29 end date by default is 2026-05-29; this following year, they sign their next paperwork prior to the end date of that calendar year
Start date 3 = 2026-05-18 end date by default is 2027-05-18.
We can only send an item to a customer, within dates that are within their respective date ranges. I can do this when I only have one customer to consider, as there is only one date range.
How do i do this so that when customer1 is selected in Sheet 1A1 the date in Sheet1B1 is checked against the first set of date ranges and if customer 2 is selected in Sheet 1A1, the date in sheet1B1 is checked against the second set of date ranges; and so on.
I need to be able to this for more than 2 customers but it does not need to be hugely scalable. Upper limit is probably less than 10.
I can do the date validation checks when I only have one set of date ranges to consider using something like this:
=COUNTIFS($C$4:$C$8,"<"&Sheet2!C3,$D$4:$D$8,">"&Sheet2!C3)
but integrating that with the drop down selection and then the corresponding date in column B is the problem.
Thanks.
My date formats below are yyyy-mm-dd
I am trying to do the following:
Sheet 1:
Column A: a user selects a customer from a drop down list of customers, so customer1, customer2...etc,. ,The first entry is in A1.
Column B: the user enters a date in column B for when an item was sent to the customer selected in A, so B1 is the date an item was sent.
Sheet 2:
I have 5 date ranges so
Column A Column B Column C
A1 Customer1 Start date 1 End date 1
Start date 2 End date 2
Start date 3 End date 3
Start date 4 End date 4
Start date 5 End date 5
Range of start dates is B1:B5 and range of end dates is C1:C5
A8: Customer2 Start date 1 End date 1
Start date 2 End date 2
Start date 3 End date 3
Start date 4 End date 4
Start date 5 End date 5
Range of start dates is B8:B12 and range of end dates is C8:C12
Each date range is 1 year from start date.
The start dates 1 through 5 are never likely to be the same for each customer as this relies on each of them signing and returning a document.
Equally there could be gaps or overlap between the ranges for a customer
e.g. Start date 1 = 2024-05-12 end date by default is 2025-05-12; there is then a delay before the customer signs their next paperwork.
Start date 2 = 2025-05-29 end date by default is 2026-05-29; this following year, they sign their next paperwork prior to the end date of that calendar year
Start date 3 = 2026-05-18 end date by default is 2027-05-18.
We can only send an item to a customer, within dates that are within their respective date ranges. I can do this when I only have one customer to consider, as there is only one date range.
How do i do this so that when customer1 is selected in Sheet 1A1 the date in Sheet1B1 is checked against the first set of date ranges and if customer 2 is selected in Sheet 1A1, the date in sheet1B1 is checked against the second set of date ranges; and so on.
I need to be able to this for more than 2 customers but it does not need to be hugely scalable. Upper limit is probably less than 10.
I can do the date validation checks when I only have one set of date ranges to consider using something like this:
=COUNTIFS($C$4:$C$8,"<"&Sheet2!C3,$D$4:$D$8,">"&Sheet2!C3)
but integrating that with the drop down selection and then the corresponding date in column B is the problem.
Thanks.