Microsoft Office Forums referencing relative cell

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-11-2019, 06:56 PM
trevorc trevorc is offline referencing relative cell Windows 7 32bit referencing relative cell Office 2013
Competent Performer
referencing relative cell
 
Join Date: Jan 2017
Posts: 117
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default referencing relative cell

Hi all,
I'm trying to create an auto mailing system, it mostly works but i need to add a check to see if the recipient has already received the email
when i added the code in red below it halts and says not supported, or with xCell.selection it says type mismatch. Otherwise it works ok without the extra code.
Any help or pointers in the right direction is appreciated.
regards
Trevor







Code:
With oExcelEmailApp
    t = InputBox("Enter cell range of E-mail addresses", "Cell Selection")
    For Each xCell In Range(t)
        If xCell.Value Like "*@*" And xCell.Col + 2 = "No" Then
            If xEmailAddr = "" Then
                xEmailAddr = xCell.Value
            Else
                xEmailAddr = xEmailAddr & " ; " & xCell.Value
            End If
        End If
    Next
 End With
Reply With Quote
  #2  
Old 08-11-2019, 09:31 PM
NoSparks NoSparks is offline referencing relative cell Windows 7 64bit referencing relative cell Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 743
NoSparks will become famous soon enoughNoSparks will become famous soon enough
Default

try
Code:
        If xCell.Value Like "*@*" And xCell.offset(,2).value = "No" Then
Reply With Quote
  #3  
Old 08-12-2019, 11:56 AM
trevorc trevorc is offline referencing relative cell Windows 7 32bit referencing relative cell Office 2013
Competent Performer
referencing relative cell
 
Join Date: Jan 2017
Posts: 117
trevorc will become famous soon enoughtrevorc will become famous soon enough
Default

That's perfect, thank you very much.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Relative link (same folder) from Excel cell into Word file SparFuX Word 1 12-18-2018 03:22 PM
Referencing a cell and getting its content and colour H28Sailor Excel 5 09-12-2017 11:41 PM
Referencing to a cell in table naeemakhtar Word VBA 1 06-02-2016 08:46 PM
referencing relative cell INDIRECT and Relative Referencing? tinfanide Excel 7 03-15-2016 06:23 AM
referencing relative cell Setting autofilter criteria using columns and cells relative to the active cell in another sheet SarahL Excel Programming 7 06-11-2015 10:26 AM


All times are GMT -7. The time now is 08:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft