+ Reply to Thread
Results 1 to 10 of 10

Macro to strikethrough row dependent of cell value in dropdown list

  1. #1
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile Macro to strikethrough row dependent of cell value in dropdown list

    Hi Guys,

    Is it possible to have a worksheet code that would underline a row if a certain value is selected in a dropdown list?

    I have a worksheet with data populated across colums A to K, in Column I there is a dropdown list. What I wanted was to be able to understrike the Columns A to K of a particular row is the value in the dropdown list in Column I ="Cancelled". I cannot use Conditional Formatting as I have already used the maximum 3 formats for other features.

    Can anyone help me please?

    Thanks in advance.
    Best Regards.

    Michael
    -----------------------------------
    Windows Vista, Microsoft Office 2007

  2. #2
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Adjust sheet/range to suit:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317
    hi Stephen, Thanks for your help. However this does not seem to be working for me unfortunately.

    My first row is Row 9. So basically rows 9 to 34 and columns A to K are where my date will be inputted and so basically whatever row has "Cancelled" in the I column then I need to strikethrough columns A to K in that row. Does this make sense?

    Thanks.

  4. #4
    Forum Guru
    Join Date
    08-26-2007
    Location
    London
    Posts
    4,606
    Michael - can you attach a small sample?

  5. #5
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    See attached file... i hope it's what you need.

    Regards,
    Antonio
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile

    Quote Originally Posted by antoka05
    See attached file... i hope it's what you need.

    Regards,
    Antonio
    Hi Antonio, excellent this is more or less exactly what I want. The only difference is I want a strikethrough as in the example on the Jpeg I uploaded. I had to do this manually.

    Also columns G & H are protected so I guess I would need to unprotect the code at the start and then re-protect at the end?
    Attached Images Attached Images

  7. #7
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I'm sorry... I didn't understand your request.

    I attached a new file hoping it's what you need.

    Regards,
    Antonio
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile

    @StephenR

    I have uploaded a sample of my spreadhsheet, I have manually formated row 13 with a strikethrough to illustrate what it is I need. The password is blank so simply click unprotect and it should unlock.

    @antoka05

    Thanks, this looks like exactly what I need. I will need to add an unlock passwork command at the top and then re-protect at the end, the reason being I don't want to users to be able to select locked cells or delete the formulas in those cells.

    Thanks, I shall try to intergrate this into my worksheet.
    Attached Files Attached Files

  9. #9
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    I'm sorry to answer so late.

    This code may fix your problem:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  10. #10
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Thumbs up

    Quote Originally Posted by antoka05
    I'm sorry to answer so late.

    This code may fix your problem:
    Please Login or Register  to view this content.
    Regards,
    Antonio
    Thanks Antonio you are awesome!!! Thank you so much this works really well and is exactly what I wanted.

    Thanks again to both of you for all of your help.
    Last edited by Zyphon; 07-18-2008 at 11:17 AM.

+ 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