+ Reply to Thread
Results 1 to 8 of 8

Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    Somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    Hi. I need some advice on this form I am creating.

    For instance, In Cell A, there is drop down menu which has the selection "yes" & "no".

    Then there's Cell B, C, D, E, F which are in turn refers to the source of the Cell A's data (e.g. Home, School, Office, Cafe, Others).

    When the answer in Cell A is "Yes", respondents are then required to select (thru dropdown the "√" symbol) at least 1 or more from B, C, D, E, F. Respondents should make at least 1 selection from B-F if they answer "Yes" to Cell A.

    * Cell A = Has Internet Connection? Yes/No
    * Cell B-F = Where do you connect to the Internet? Choose 1 or more by "√".


    What VB script can I use for this? Would really appreciate this. Thank you very much.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    12,895

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

    Doing this will ensure you get the result you need!

  3. #3
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    Cross posted here: http://www.mrexcel.com/forum/showthread.php?t=474627

    Ice Burn please read this: http://www.excelguru.ca/node/7

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    06-15-2010
    Location
    Somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    Sorry for cross posting but I am really pressured to find a solution to this. I don't do much VB so I need all the help I can get.

    Attached is the sample.

    Thanks for the help.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-15-2010
    Location
    Somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    Please help!

  6. #6
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    How's this?

    Please Login or Register  to view this content.

    The code needs to be placed on the worksheet's code page. Right click on the sheet tab and select View Code. Paste the above on the code sheet that is displayed.

    Hope it helps,

    Dom

  7. #7
    Registered User
    Join Date
    06-15-2010
    Location
    Somewhere
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    Thank you very much for the reply.

    The code does work with 1 work sheet with 1 rule. But it does not seem to work when there are several worksheets and columns needing the same rules. Maybe I am doing it wrong but I can't seem to get it to work with the other sheets.

    The actual workbook I am working on has 12 sheets with a number columns needing the same rules.

    I just decided to do a validation with a warning message when cell A is selected and conditional formatting which highlighted the required cells when cell A has been answered as users were also disabling the macros which invalidated the code.

  8. #8
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Requiring Data Entry in Cell B (et al) when Data has been entered in Cell A.

    If the layout of all the sheets is the same you can use a Workbook_SheetSelectionChange event code that will operate on all the sheets in a workbook without having to duplicate the code for each sheet.

    As for users not enabling macros that's always a problem that you will encounter. The most common way to deal with it is to have all but one sheet, with a message on it telling the user to enable macros, very hidden. If macros are enabled a Workbook_Open event code unhides all the sheets and the user can work as normal otherwise they just see the warning and a Workbook_BeforeClose event hides all the sheets on exiting. There's an example here although simpler code can be used.

    Dom

+ 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