+ Reply to Thread
Results 1 to 5 of 5

How to format the whole row if some merged (2-line) cell is selected

  1. #1
    Registered User
    Join Date
    11-21-2018
    Location
    Coventry, United Kingdom
    MS-Off Ver
    Office 365
    Posts
    2

    Post How to format the whole row if some merged (2-line) cell is selected

    Hello Friends,

    I have a question I haven't found any answers properly to fit my request. I tried some Condition Format rules without success.

    I would like to format the whole row depending on the selected value (but this value is inside a 2-line Merged cell), see example attached. So when I select "ADD" the second line should change the pattern and if I select "DELETE" the first line should change the pattern.

    Could you help me? Thanks
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to format the whole row if some merged (2-line) cell is selected

    Welcome to the forum.

    The answer is simple: do NOT use merged cells. If you do, you are storing up trouble for yourself (this is just the tip of the iceberg).
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    11-21-2018
    Location
    Coventry, United Kingdom
    MS-Off Ver
    Office 365
    Posts
    2

    Re: How to format the whole row if some merged (2-line) cell is selected

    Thanks Ali, but in this case the Merge is necessary and I'd seen a similar spreadsheet with the same solution, but I could not see how it was made (maybe using VBA). I will keep waiting for another solution. Cheers!!

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: How to format the whole row if some merged (2-line) cell is selected

    Merge is almost never necessary.

    However, this is still doable. You will need 2 rules for each row - 1 for the top row that tests eg A2 for DELETED and formats accordingly, and another rule for the 2nd row that tests A2 for ADD and then formats accordingly

    (As Ali said, using merged cells just creates headaches and more work for yourself)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: How to format the whole row if some merged (2-line) cell is selected

    I would love to know whey you think the merged cells here are necessary. I presume you really mean desirable? I can't see from the screenshot provided why you actually NEED them.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Show comment when merged cell is selected
    By Stuartzz in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-06-2019, 07:14 PM
  2. [SOLVED] Pasting an image into selected merged cells. VBA to size automatically to selected range
    By DCC_PD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-28-2015, 09:57 AM
  3. Insert image and resize to fit merges selected cell (also merged cell)
    By acecarwash in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2014, 09:55 AM
  4. Select a Range of Cells Offset from a Selected Merged cell
    By kelvomatic in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-07-2013, 05:52 PM
  5. User selected merged cell range to be cleared
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-06-2010, 11:21 PM
  6. How to include new line within merged cell
    By prontrad in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-23-2009, 08:47 PM
  7. Replies: 1
    Last Post: 06-27-2005, 06:05 AM

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