+ Reply to Thread
Results 1 to 3 of 3

Data Validation Question

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Seattle,Wa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Data Validation Question

    Okay I see that Excel 2010 offers this Data validation. Which almost works for me. But I need it to go one more step. I need to apply like a If statement to it.
    What I'm trying to do is Say Column A = XYZ then Column C only allow a Number 1-1000.
    Any ideas on how to make this happen?

  2. #2
    Registered User
    Join Date
    08-04-2011
    Location
    Cornwall
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Data Validation Question

    You could use a formula to generate the upper and lower limits for the data validation.
    For example, in E1 you put =IF(A1="XYZ",1,-99999) and in F1 you put =IF(A1="XYZ",1000,99999).
    So if A1 contains XYZ then E1 and F1 will contain 1 and 1000
    Then in C1 you use Data Validation with Decimal Between and point the Minimum to E1 and the Maximum to F1.
    (adjust 99999 to cope with the biggest and smallest numbers that might be entered in column C)
    You can hide columns E and F if you wish.
    I hope this helps.

  3. #3
    Registered User
    Join Date
    08-04-2011
    Location
    Seattle,Wa
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Data Validation Question

    not sure I'll have to try that. I think it would make more sense if you guys knew what I was really trying to do.
    See I create this Import file to automate some orders into our ERP system. I get a email from a vendor with a excel sheet with all the date mostly ready except they have some blank rows so I just did a simple step to remove all the blank rows and copy the file to the automation processes. But there is always still a chance that a user could edit one of the fields and blow this whole thing up.

    So the file looks like this
    I have a Header record and a data record
    In Column A I define the Header Record as HDR
    and if its Data then DAT.
    Now Column C in the HDR record. is something we call memo code. by default so the order takers can find and check on the order after its imported. I have the vendor put in HBR. But the Data records in column C will be the Qty. So those have to be a number. So what I was looking for is some way to prevent the user accidentally just putting a letter in column C on a DAT record. but at this point I'm thinking I might see how hard it might be to just move the memo code to another column.
    if you got any Ideas let me know. and thanks for the response.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1