Consulting

Results 1 to 5 of 5

Thread: Array or multiple lookups help

  1. #1
    VBAX Regular
    Joined
    Dec 2007
    Posts
    26
    Location

    Array or multiple lookups help

    Guys,

    I am trying to put some error checking into a spreadsheet that people fill out, after completing some work.

    Basically i need to make sure that when someone enters values against a location, that they are within a certain range. But the kicker is that there are multiple ranges against any given location and the values cannot cross into a new range even though it is the same location.

    I have a attached a make shift spreadsheet to give you an indication of what i mean.

    Any thoughts or comments on this would be greatly appreciated.

    Thanks

    Gareth

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Would values of A, 0.5, 1.0 be okay, but should that reject because the 1.0 is valid for A, but only if the start is >= 0.85?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi Gareth,

    Messed with it bit. Col I has a list created by Advanced Filter for Unique values. That in turn is used by Data Validation for Loc Name input. Then a sheet change sub checks the input table range. If there is a change in the table it checks that all three cells are inputted and checks the Start/End of the input data...

    A little complicated but attempts to check everything!
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  4. #4
    VBAX Regular
    Joined
    Dec 2007
    Posts
    26
    Location
    Sorry about the late response new years and all that, but thanks for your comments, they are much appreciated

    XLD:- Yes it should reject as the range is outside that section of location A

    rbrhodes:- Thanks for your time and effort, this is pretty much exactly what i have been looking to do, i was just unable to come up with a working solution, with a few changes here and there i should be able to come up with a completed solution. I will just have to test now on actual data which has nearly 700 locations, so i will see how it is handled.

    I was thinking i might add this as check locations button before the user saves, this way i can add a comment or a list of erroneous cells. So that every time the user enters a new location he is not prompted with an error.

    I will let you know how i go.

    Thanks again,

    Gareth

  5. #5
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi G,

    Yes it's a stab in the dark as I don't know your real data...

    It will give a message based on whatever it finds first - start or end that is 'out of range' and that might want to be looked at, but I was trying to outsmart the user and all <grin>

    Let me know how it works out. You could even check my rudimentary website or email me (click my sig or username) for more help and/or more about me - I'm always looking for gigs!
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •