+ Reply to Thread
Results 1 to 4 of 4

Send unique values + top 2 header rows macro

  1. #1
    Registered User
    Join Date
    09-30-2019
    Location
    Tamworth, Staffordshire
    MS-Off Ver
    2010
    Posts
    4

    Send unique values + top 2 header rows macro

    Hi All,

    Just looking to see if someone could help me with this code i got from Ron De Bruin's website. It copies particular rows (+ the header row) of a sheet based on the value in column A, and pastes it into an Email body, sending to the applicable Email recipient in another tab. It works an absolute treat, except i need it to copy the unique values + the top 2 header rows (as opposed to just the top row). I

    Any help would be much appreciated. Thanks in advance.

    Please Login or Register  to view this content.
    Last edited by davesexcel; 09-30-2019 at 12:51 PM.

  2. #2
    Registered User
    Join Date
    09-30-2019
    Location
    Tamworth, Staffordshire
    MS-Off Ver
    2010
    Posts
    4

    Re: Send unique values + top 2 header rows macro

    If it helps, i've attached a simplified version of the Workbook i'm using.

    Thanks
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-30-2019
    Location
    Tamworth, Staffordshire
    MS-Off Ver
    2010
    Posts
    4

    Re: Send unique values + top 2 header rows macro

    Fairly certain i could achieve the desired result with The Operator Parameter (based on the value in cell A2), but can't quite get it to work.

  4. #4
    Registered User
    Join Date
    09-30-2019
    Location
    Tamworth, Staffordshire
    MS-Off Ver
    2010
    Posts
    4

    Re: Send unique values + top 2 header rows macro

    Finally got it...


    'Filter the FilterRange on the FieldNum column
    FilterRange.AutoFilter Field:=FieldNum, _
    Field:=iCol, _
    Criteria1:=Cws.Cells(Rnum, 1).Value, _
    Operator:=xlOr, _
    Criteria2:="Engineer"

+ 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] Macro to filter column and copy rows to new sheet with loop for all unique values in colum
    By Gryphoune in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2015, 09:15 AM
  2. macro to send an email for every unique item
    By melody10 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-08-2014, 11:34 PM
  3. VBA code to convert multiple rows as column header grouped by unique key
    By Shreyas11 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2014, 09:03 PM
  4. [SOLVED] Macro that merges duplicate rows based on unique values - Need to edit current code
    By niya429 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2014, 02:57 PM
  5. [SOLVED] Macro to merge duplicate rows unique values - current macro not working
    By aimeecrystalaid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-06-2013, 03:42 PM
  6. Macro to send Email to Unique Recipients
    By jhuang in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-17-2012, 02:37 AM
  7. Replies: 3
    Last Post: 07-07-2011, 08:24 PM

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