kelly mort
Well-known Member
- Joined
- Apr 10, 2017
- Messages
- 2,169
- Office Version
- 2016
- Platform
- Windows
HelloWorld,
I have this challenge here with me and I need some help.
I want to look compare the day and month of the date in cell A2 with the date ranges below. Then when I find a match , I use that match to select at random one item from one of the arrays.
So if the match is seen in range A of the dates, then we select at random one item from arr(1).
If in date range B then arr (2)
In that order.
These are sample of date ranges :
Note :
These dates will be hard coded and will vary.
Say 23rd may – 17th June is a good example of what dates I will be using .
Only the day and month is needed here, the year is not needed in this situation.
My dates are in the format “dd-mm-yy”
These are the examples for the array I want to use :
I have this challenge here with me and I need some help.
I want to look compare the day and month of the date in cell A2 with the date ranges below. Then when I find a match , I use that match to select at random one item from one of the arrays.
So if the match is seen in range A of the dates, then we select at random one item from arr(1).
If in date range B then arr (2)
In that order.
These are sample of date ranges :
Code:
A = 1st May – 30th June
B = 1st July – 31st August
C = 1st September – 31st October
D = 1st November – 31st December
E = 1st January – 29th February
Note :
These dates will be hard coded and will vary.
Say 23rd may – 17th June is a good example of what dates I will be using .
Only the day and month is needed here, the year is not needed in this situation.
My dates are in the format “dd-mm-yy”
These are the examples for the array I want to use :
Code:
Arr (1) = (“mango”, “apple”, “pear”, “orange”, “lime”)
Arr (2) = (“Tilapia”, “whale”, “Tuna”, “salmon”)
Arr (3) = (“Red”, “white”, “black”, “ash”, “violet”, “blue”, “green”)
Arr (4) = (“kia”, “hundai”, “Nissan”, “Toyota”)
Arr (5) = (“Dell”, “Lenovo”, “HP”, “Toshiba”, “Accer”)