Issue with datavalidation

flyinghigher2014

New member
Joined
May 12, 2016
Messages
13
Reaction score
0
Points
0
hi all

im having some issues with my data validation code

Code:
=OFFSET(Products!$E$5,MATCH($H$19,Caravan_Full,0),0,COUNTIF(Caravan_Full,$H$19),1)

Products section is a list of products eg week hire, gas, gas2, gas3

Caravan_Full is a list of catagories or in my case caravans eg BLP22a, KD1, BLP15E

where this code is located (on my invoice), it looks 1 col to the left and then selects from the product page what items are for the the caravan, but its not doing that its just mixing it all up.

ive added file for viewing

can someone help me please
 

Attachments

  • for forum.xlsm
    399.6 KB · Views: 6
3 points:
1. The dynamic named range Caravan_Full is a little too dynamic!
Try changing to:
=OFFSET(Products!$D$6,,,COUNTA(Products!$D$5:$D$65000))

2. The data validation in I19 (Invoice Sheet) is:
=OFFSET(Products!$E$5,MATCH($H$19,Caravan_Full,0),0,COUNTIF(Caravan_Full,$H$19),1) which is more or less OK for I19, but the same DV is used for the other cells in column I; they're all referring to H19. Try changing to:
=OFFSET(Products!$E$5,MATCH($H19,Caravan_Full,0),0,COUNTIF(Caravan_Full,$H19),1)

3. For this to work as I think you want it to, the data in the Products sheet table should have all similar Caravan column data together, so sort the whole table by that column D and keep it that way after additions.

See attached.
 

Attachments

  • excelGuru6044for forum.xlsm
    342.8 KB · Views: 1
Wow!
4 minutes since I posted and you're sorted and the attached file still showing 0 views. Quick work. (Or had you already sorted it?)
 
Back
Top