+ Reply to Thread
Results 1 to 8 of 8

Partial duplicate - Sumproduct VBA Help!

  1. #1
    Registered User
    Join Date
    10-23-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Partial duplicate - Sumproduct VBA Help!

    Hi All,

    My VBA skill level is basic to say the least. I am hoping that someone could give me a pointer on getting the following formula:

    =SUMPRODUCT(--(MID($E$10:$E$4000,4,5)=MID(E10,4,5))*($E$10:$E$4000<>""))>1

    To work within VBA based on the following code...
    Please Login or Register  to view this content.
    Data example:

    Column E:

    ASH2322
    TUR2323
    CRI2262a
    NOR2276a - highlighted
    CER2183a
    tas2276a - highlighted


    I look forward to being no undoubtedly schooled by someone with the knowledge. I have already added a no format with .StopIfTrue=True to stop blanks in the array from formatting red!

    Thanks,

    Kanage
    Last edited by Kanage; 10-23-2018 at 09:45 AM.

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Partial duplicate - Sumproduct VBA Help!

    Please use code tags.

    You need:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Registered User
    Join Date
    10-23-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Re: Partial duplicate - Sumproduct VBA Help!

    Hi Rory,

    Many thanks for the rapid response, That fix has gotten the formatting doing what i had hoped.

    The next issue is it seems my blank cell format stop is not working.

    (I also had to make all arrays start from $E$9 due to the initial section of code!)

    Please Login or Register  to view this content.
    This is first in the list of the macro. And from my knowledge of how the standard function works this should mean cells which are blank should not be considered further.
    Also apologies for not using the appropriate tags!

    Kanage

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Partial duplicate - Sumproduct VBA Help!

    What formatting have you set (there isn't any in that code) and what is happening?

  5. #5
    Registered User
    Join Date
    10-23-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Re: Partial duplicate - Sumproduct VBA Help!

    The aim is to rectify the fact that the duplicate formula identifies blank cells as duplicates. (Even with
    Please Login or Register  to view this content.
    being included!)

    As such the 1st conditional format is intentionally left blank, effectively to trick excel to leave the cell alone. With the Stop if true value meaning the later conditional formats are not run.

    At least that's my logic on the approach, and a work around i have used without VBA previously.

    Img below highlights the colouring issue on blank cells.

    CondFormat example.PNG

    Thanks for your patience!

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Partial duplicate - Sumproduct VBA Help!

    I'd change the formula to something like:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    10-23-2018
    Location
    UK
    MS-Off Ver
    365
    Posts
    4

    Re: Partial duplicate - Sumproduct VBA Help!

    That's a much better way of going about it! I got so caught up on trying to get the formatting to work i didn't think to expand it! now just to flip this on its head to highlight new clients and the sheet is up to scratch again!!

    Many thanks for your help today!

    now just to find the solved button.

  8. #8
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,913

    Re: Partial duplicate - Sumproduct VBA Help!

    Glad to help. The Solved link is under Thread Tools at the top.

+ 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. partial duplicate rows
    By bhiseamo in forum Excel General
    Replies: 3
    Last Post: 04-03-2017, 02:16 AM
  2. [SOLVED] Sumproduct does NOT contain partial string
    By rodgersmg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-09-2015, 01:56 AM
  3. Sumproduct - Multiple Criteria and Partial months
    By dluhut in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-18-2014, 02:02 PM
  4. Finding partial duplicate values in the same column
    By cmax979 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-09-2013, 06:11 PM
  5. [SOLVED] sumproduct partial text count
    By Ribeye in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-14-2006, 02:50 PM
  6. Sumproduct and finding partial strings
    By Jeff in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-06-2005, 01:06 PM

Tags for this Thread

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