Hi all,
My skill in translating logic into a formula and especially VBA is very limited. Hopefully the below makes sense.
Basically I was hoping for a VBA code that pulls through results on to a new sheet by using the reference column A (Order Ref) in Sheet 2 and comparing columns of the corresponding Column A in Sheet 1. I was then hoping to pull through results on to sheet 3 based on the following unrelated columns in Sheet 2 –
OR
Hopefully the below helps illustrate this –
Thank you so much!
My skill in translating logic into a formula and especially VBA is very limited. Hopefully the below makes sense.
Basically I was hoping for a VBA code that pulls through results on to a new sheet by using the reference column A (Order Ref) in Sheet 2 and comparing columns of the corresponding Column A in Sheet 1. I was then hoping to pull through results on to sheet 3 based on the following unrelated columns in Sheet 2 –
- Column I = Y
- Column G = more than 6 months difference in date vs sheet 1 (sheet 1 will have the later/future dates)
OR
- Column B = does not match column B in sheet 1
Hopefully the below helps illustrate this –
Sheet 1 | |||||||||
A | B | C | D | E | F | G | H | I | J |
Order Ref | Customer | Type | PO | BA | VALUE | Order Start | Discount | Duty | Duty Startdate |
123 | Harry | Apple | 1 | New Request | $3,443.00 | 01/06/2022 | Y | N | 01/07/2022 |
14300 | John | Pear | 3 | New Request | $655.00 | 01/04/2022 | Y | N | 01/04/2022 |
7800 | Kevin | Orange | 5 | New Request | $656.00 | 01/06/2022 | Y | N | 01/04/2023 |
7800 | Peter | Mango | 7 | New Request | $453.00 | 01/04/2023 | Y | Y | 01/04/2023 |
73900 | James | Strawberry | 1 | New Request | $656.00 | 01/02/2023 | Y | Y | 01/07/2023 |
900 | Jack | Blackberry | 2 | New Request | $567.00 | 01/03/2023 | | N | 01/03/2023 |
18800 | Levi | Pineapple | 4 | New Request | $3,445.00 | 03/06/2023 | Y | N | 03/06/2023 |
188002 | Leon | Apple | 6 | New Request | $676.00 | 01/01/2014 | Y | Y | 01/01/2014 |
Sheet 2 | |||||||||
A | B | C | D | E | F | G | H | I | J |
Order Ref | Customer | Type | PO | BA | VALUE | Order Start | Discount | Duty | Duty Startdate |
123 | Harry | Apple | 1 | New Request | $3,443.00 | 01/06/2022 | Y | Y | 01/06/2022 |
14300 | John | Pear | 3 | New Request | $655.00 | 01/04/2022 | Y | Y | 01/04/2022 |
7800 | Kevin | Orange | 5 | New Request | $656.00 | 01/06/2022 | Y | Y | 01/06/2022 |
7800 | Peter | Mango | 7 | New Request | $453.00 | 01/04/2023 | Y | Y | 01/04/2023 |
73900 | Philip | Strawberry | 1 | New Request | $656.00 | 01/02/2023 | Y | Y | 01/06/2023 |
900 | Jack | BlackBerry | 2 | New Request | $567.00 | 01/03/2023 | | N | 01/03/2023 |
18800 | Oscar | Pineapple | 4 | New Request | $3,445.00 | 03/06/2023 | Y | Y | 01/04/2021 |
188002 | Leon | Apple | 6 | New Request | $676.00 | 01/01/2014 | Y | Y | 01/01/2014 |
Sheet 3 Results | |||||||||
A | B | C | D | E | F | G | H | I | J |
Order Ref | Customer | Type | PO | BA | VALUE | Order Start | Discount | Duty | Duty Startdate |
7800 | Kevin | Orange | 5 | New Request | $656.00 | 01/06/2022 | Y | N | 01/04/2023 |
73900 | James | Strawberry | 1 | New Request | $656.00 | 01/02/2023 | Y | Y | 01/07/2023 |
18800 | Levi | Pineapple | 4 | New Request | $3,445.00 | 03/06/2023 | Y | N | 03/06/2023 |
188002 | Leon | Apple | 6 | New Request | $676.00 | 01/01/2014 | Y | Y | 01/01/2014 |
Thank you so much!