+ Reply to Thread
Results 1 to 8 of 8

Data Validation with an IF

Hybrid View

DertyLlama792 Data Validation with an IF 06-18-2012, 11:29 AM
dilipandey Re: Data Validation with an IF 06-18-2012, 01:46 PM
DertyLlama792 Re: Data Validation with an IF 06-18-2012, 01:59 PM
dilipandey Re: Data Validation with an IF 06-18-2012, 02:25 PM
DertyLlama792 Re: Data Validation with an IF 06-18-2012, 02:45 PM
dilipandey Re: Data Validation with an IF 06-18-2012, 03:03 PM
DertyLlama792 Re: Data Validation with an IF 06-18-2012, 03:03 PM
dilipandey Re: Data Validation with an IF 06-18-2012, 03:06 PM
  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    New Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    4

    Data Validation with an IF

    I am looking for a way to have a cell default to a named cell if another cell has the answer "yes" and if the cell says "no" i want the user to be able to input any number. Any tricks out there that could solve my problem?

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Data Validation with an IF

    Hi DertyLlama792,

    Welcome to the forum.

    I guess IF function will not suit here.. the only solution is VBA (macros). Thanks.
    Are you fine with this?

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), dilipandey@gmail.com

  3. #3
    Registered User
    Join Date
    06-18-2012
    Location
    New Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Data Validation with an IF

    Do you have any suggestions for functions that i could possibly use. I am familiar with VBA but more with writing loops and not necessarily data validation

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Data Validation with an IF

    Hi DirtyLlama792,

    As you are familiar with VBA, try using below approach :-

    'put data validation as Yes, No in cell a1
    
    If range("a1") = "No" Then
    k = InputBox("Please enter a value", "Input")
    Else
    k = "=data" 'where "data" is a defined name
    
    End If
    range("b1") = k
    Note: I have not tested it.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    06-18-2012
    Location
    New Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Data Validation with an IF

    Thanks! Do you know if there is anyway to activate a macro when the "Yes" "No" cell has been changed?

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Data Validation with an IF

    Hi DertyLlama792,

    Since you are familiar with VBA, you can use worksheet events like "selection change" or "change" ..
    up to you

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Registered User
    Join Date
    06-18-2012
    Location
    New Hartford, CT
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Data Validation with an IF

    All set thanks!!

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Data Validation with an IF

    You are welcome..

    Cheers

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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