Automatically fill cells with text based on values in two other cells

  • I am new to VBA code, but have been able to figure out most of my issue through searching the forums. I've run into a pretty simple issue I can't figure out though.


    My end goal is to have cells D14 to D98 automatically fill with the text "Mfg Line" if cell D8 is "Product" AND Cell D9 is "Assembly". I would like this to happen as soon as the selections in D8 and D9 are made. If D8 is not "Product" or D9 is not "Assembly" I would like cells D14 to D98 to remain blank.


    I can't use an If formula in the cell because if the cell is blank the user will need to type in a value, which would delete the formula. It seems like it should be pretty simple, but I've tried piecing together information from other posts and haven't been able to get anything to work. Any suggestions?

  • Put this code in the sheet module.