+ Reply to Thread
Results 1 to 8 of 8

Search text in a column and send an email with all the data in that row

  1. #1
    Registered User
    Join Date
    08-03-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    14

    Search text in a column and send an email with all the data in that row

    Hi all,

    I have a file with around 55 columns and 400 rows.

    All I need is that the data from columns A, AA, AG, BA, BB to be sent to my email including the headings of those columns that are located in row 4. This is based on the data in column BB that has text "Delivered". So those with "Delivered" should be copied.

    A AA AG BA BB
    4 No. ATA PORT ATA DEM DEL
    5 123 12-09-2016 12-02-2016 2 Delivered
    6 234 12-08-2016 12-03-2016 5
    7 567 12-07-2016 12-04-2016 7
    8 890 12-06-2016 12-05-2016 8 Delivered

    Thanks a lot!

    Phil

  2. #2
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Search text in a column and send an email with all the data in that row

    Assuming your data is in sheet named "Data" try this macro-
    (remember to enter your email in the macro)
    Please Login or Register  to view this content.
    Happy to Help

    How to upload excel workbooks at this forum - http://www.excelforum.com/the-water-...his-forum.html

    "I don't get things easily, so please be precise and elaborate"

    If someone's post has helped you, thank by clicking on "Add Reputation" below the post.
    If your query is resolved please mark the thread as "Solved" from the "Thread Tools" above.

    Sourabh

  3. #3
    Registered User
    Join Date
    08-03-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Search text in a column and send an email with all the data in that row

    Hi!

    Thanks a lot for this. Unfortunately it gives me a 400 error.

    I tested it by replacing this :

    tr = Sheets("rough").Range("A" & Rows.Count).End(xlUp).Row
    Sheets("rough").Select
    Range("A1:E" & tr).Select
    Selection.NumberFormat = "@"

    For:

    "ActiveSheet.Range("A1:E112").Select"

    to select the data in the "rough" sheet. It worked very well. However, the selection is not flexible as you can see. So, I assume that the error is in that part that I replaced.

    Additionally, the sheet you call "Data" changes its name every week. Is there any way to work around this?

  4. #4
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Search text in a column and send an email with all the data in that row

    I don't know why it gives an error for you. I have tested it and it is working perfectly.

    Can you attach the worksheet where it is giving an error?

  5. #5
    Registered User
    Join Date
    08-03-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Search text in a column and send an email with all the data in that row

    Here

    Thank you!
    Attached Files Attached Files

  6. #6
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Search text in a column and send an email with all the data in that row

    Try this-
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-03-2013
    Location
    Denmark
    MS-Off Ver
    Excel 2010
    Posts
    14

    Re: Search text in a column and send an email with all the data in that row

    Thanks! It works now

  8. #8
    Forum Expert sourabhg98's Avatar
    Join Date
    10-22-2014
    Location
    New Delhi, India
    MS-Off Ver
    Excel 2007, 2013
    Posts
    1,899

    Re: Search text in a column and send an email with all the data in that row

    Glad to know that helped!
    Have a nice day

+ 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. Send email when 2 cells contains specific text.
    By jurgen010 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2015, 04:54 PM
  2. macro to send email if a value appear in a column
    By zois in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-02-2015, 02:01 PM
  3. Workflow with signatures (if cell=x then send email, if signed then send email)
    By Kate2811 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2014, 05:37 AM
  4. Search multiple columns of dates and send reminder email 30 days before expiry
    By prh2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2013, 12:47 AM
  5. auto search for expiration date and send email to users
    By mingchu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2013, 06:07 PM
  6. Outlook send email from data in column from excel spreadsheet
    By benasalisbury in forum Outlook Programming / VBA / Macros
    Replies: 10
    Last Post: 03-16-2012, 02:24 AM
  7. Send data from Excel in email from specific email account
    By eriknokc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-05-2007, 05:02 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