+ Reply to Thread
Results 1 to 5 of 5

Macro to detect when cells within column vary from cell above, and format accordingly ?

  1. #1
    Registered User
    Join Date
    06-15-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Macro to detect when cells within column vary from cell above, and format accordingly ?

    Hi all,

    Hope this comes across clearly (also, please consider the cells/rows/columns noted below as examples ... )

    I'm looking to create a macro that will:

    1. "read" down a column I designate (i.e. column 'C'),
    2. then notice when a cell differs from a previous cell (i.e. cells c1-c10 have text "V123" and cell c11-c13 changes to text "V193", and cell c14-c20 changes to text "V223" - in essence flag these "group" changes),
    3. then apply a conditional format to those "groups" (i.e. apply format to each group c1-c10, c11-c13, c14-c20) so I can review. Specifically, I'd like to insert a row above where the change occurs so I can sum the totals in the group previous (in column 'D', as example).

    Worth noting, the values in the columns are products that shipped, so vary per order.

    As always, any help is appreciated !
    jkm

  2. #2
    Forum Contributor
    Join Date
    04-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    325

    Re: Macro to detect when cells within column vary from cell above, and format accordingly

    Please Login or Register  to view this content.
    I did this code for a user a few days ago. It adds a space when a value changes in row A but you can make it any row you want.

  3. #3
    Registered User
    Join Date
    06-15-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to detect when cells within column vary from cell above, and format accordingly

    111Steps ... thanks a load. It works perfectly.

    But I suppose I was not totally clear. Is there a way to add a space to not just the column (as you've done), but to the whole row ?

    So close mate - truly appreciate it !
    jkm

  4. #4
    Forum Contributor
    Join Date
    04-11-2011
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    325

    Re: Macro to detect when cells within column vary from cell above, and format accordingly

    Please Login or Register  to view this content.
    should become

    Please Login or Register  to view this content.
    if I remember correctly.

  5. #5
    Registered User
    Join Date
    06-15-2010
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Macro to detect when cells within column vary from cell above, and format accordingly

    Works perfectly. Many thanks. I have another question, but I will post it in the general. Many many thanks ...

+ 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