+ Reply to Thread
Results 1 to 5 of 5

Data Validation within Conditional Statement

  1. #1
    Registered User
    Join Date
    12-17-2012
    Location
    New Haven, CT
    MS-Off Ver
    Excel 2010
    Posts
    2

    Data Validation within Conditional Statement

    Hi,

    I have created an excel worksheet that has a certain table (including formats) copied and pasted 25 times to represent 25 time points within an experiment. Each row in a particular table (15 rows total) represents the status of a tumor over the 25 successive time points. I have used data validation in columns A and B to create a drop-down list that describes the location and status of a tumor for that particular time point.

    My question regards auto-populating corresponding cells in each sequential time point trial. Suppose a value is selected from the drop-down and entered in cells A1 and B1. Is there a way to either autopopulate the corresponding cells in each table thereafter if a value exists or apply the same drop-down list if a value doesn't exist?

    Please let me know if I should elaborate further or provide the sheet itself.

    Thanks in advance

  2. #2
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Data Validation within Conditional Statement

    Hi khandiman490,

    Please attach a sample spreadsheet... along with sample results (with explanation)... this would help us with your question...

    Thanks,
    Dennis

  3. #3
    Registered User
    Join Date
    12-17-2012
    Location
    New Haven, CT
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Data Validation within Conditional Statement

    Hi Dennis,

    Thanks for the prompt response. I have attached the worksheet for your convenience. what I'm trying to do is somehow create a macro/conditional statement for columns B and C. As seen in the sheet, if you select an option from the dropdown in cells B6 and C6 (doesn't matter what the value is), I would like excel to auto populate each subsequent row that corresponds to L01 (value in A6) with that given value. In other words, I would want the value in cells B6 and C6 to be copy and pasted into (B25, C25), (B47, C47), (B69, C69), etc. If there is no value in B6 and C6, I would want the subsequent cells to provide the user with the same drop down options listed in B6 and C6.

    Hope that's clear enough.

    Thanks
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Data Validation within Conditional Statement

    Hi khandiman,

    Sorry, my work got in the way... anyway, it's lunch time and I'll see what we can do...

    I have a couple of questions...
    1. I'm assuming when you put a timepoint in cell B2, then you want the Baseline Scan section to paste in the proper Time Point sections in blue.
    2. If 1 is correct, then do you want the "scan date" to show up in the header? "Time Point 1 scan date: 1/1/2013"
    3. Why do you want the drop down options to disappear from the newly hard-coded values in the corresponding sections? You don't want them to overrride them?
    4. What about "re-writing" in a particular section? Any ideas?

    Thanks,
    Dennis

  5. #5
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Data Validation within Conditional Statement

    Hi khandiman,

    Sorry, my VBA is pretty basic... it's a mix of recorded macros and a little logic... but it works... go ahead, programmers... have at it...

    Anyway, check it out and see if this is what you want it to do... I didn't do anything with the dates (#2 in my questions) and about "re-writing" (#4).

    Take care,
    Dennis

    re-post: If anyone wants to tweak the macro, please go ahead... I'm here to learn too... thanks...
    Attached Files Attached Files
    Last edited by djapigo; 12-17-2012 at 05:58 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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