RockandGrohl
Well-known Member
- Joined
- Aug 1, 2018
- Messages
- 810
- Office Version
- 365
- Platform
- Windows
My formula has magically stopped working.. it used to look like this:
=IFERROR(IF(COUNTIF(BookData!O:O,EnqData!Q3)=0,"",INDEX(BookData!B:B,MATCH(Q3,IF(BookData!H:H>=C3,BookData!O:O,""),0),0)),"")
What this does:
First portion - Counts whether the unique customer reference in Q3 matches any references in BookData!O:O. If there are no matching references, the formula terminates.
Second portion - Index Match. This returns the Booking reference (held in B:B) based on a match of Q3 in O:O of Booking Data. However, there is an IF statement inside which says "If the Booking Date (H:H) is greater than or equal to C3 (the enquiry date) then return the match in O:O, otherwise, do nothing.
This formula was working nicely, but after some iterations to my sheets I've noticed it's stopped. I have double checked and ensured that each sheet has the correct references. If I remove the IF statement, the formula works as it should, except now it shows me any booking dates that match the reference, not just ones made after the enquiry (so it's rendered useless for calculating how long it takes customers to book after enquiring)
Thank you!
O:O - Booking Data Customer Reference
B:B - Booking Data Booking Reference
H:H - Booking Data Book Date
Q:Q - Enquiry Data Customer Reference
C:C - Enquiry Data Enquiry Date
I hope this makes sense.
=IFERROR(IF(COUNTIF(BookData!O:O,EnqData!Q3)=0,"",INDEX(BookData!B:B,MATCH(Q3,IF(BookData!H:H>=C3,BookData!O:O,""),0),0)),"")
What this does:
First portion - Counts whether the unique customer reference in Q3 matches any references in BookData!O:O. If there are no matching references, the formula terminates.
Second portion - Index Match. This returns the Booking reference (held in B:B) based on a match of Q3 in O:O of Booking Data. However, there is an IF statement inside which says "If the Booking Date (H:H) is greater than or equal to C3 (the enquiry date) then return the match in O:O, otherwise, do nothing.
This formula was working nicely, but after some iterations to my sheets I've noticed it's stopped. I have double checked and ensured that each sheet has the correct references. If I remove the IF statement, the formula works as it should, except now it shows me any booking dates that match the reference, not just ones made after the enquiry (so it's rendered useless for calculating how long it takes customers to book after enquiring)
Thank you!
O:O - Booking Data Customer Reference
B:B - Booking Data Booking Reference
H:H - Booking Data Book Date
Q:Q - Enquiry Data Customer Reference
C:C - Enquiry Data Enquiry Date
I hope this makes sense.