+ Reply to Thread
Results 1 to 5 of 5

How to use OR condition to add another target cell?

  1. #1
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126

    How to use OR condition to add another target cell?

    With Intersect(Target,cells(i,j) only, the code works fine but adding another statement after OR throws an error saying object or with block variable not set.

    Objective: throw a prompt, for copy and paste, at row 86 and row 70 using worksheet event function.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: How to use OR condition to add another target cell?

    Hi,

    Try this..

    Please Login or Register  to view this content.
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2503
    Posts
    1,485

    Re: How to use OR condition to add another target cell?

    Could use union:

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126
    Quote Originally Posted by CheeseSandwich View Post
    Could use union:

    Please Login or Register  to view this content.
    Thanks. I like this elegant solution.

  5. #5
    Forum Contributor
    Join Date
    06-20-2021
    Location
    UK
    MS-Off Ver
    2016
    Posts
    126
    Quote Originally Posted by sweep View Post
    Hi,

    Try this..

    Please Login or Register  to view this content.
    Interesting I needed to declare nothing twice.

+ 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. Macro to Target Newest Email Item in Inbox, Process Target, move Target to subfolder
    By VBANood123 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 02-14-2022, 05:54 PM
  2. Target to any cell condition
    By amein in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2016, 07:40 AM
  3. How to send value to predefined cell target when input meets a certain condition
    By namy77 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-09-2016, 05:18 PM
  4. Timestamp beneath target cell when target cell's value changes based on calculation.
    By arwebb0264 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-15-2016, 06:31 PM
  5. Self Ajusting cell , moving to provide target to meet end of year target
    By andycuk7 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-15-2016, 11:22 AM
  6. Replies: 5
    Last Post: 01-22-2013, 11:38 AM
  7. Worksheet_CHange (ByVal Target as Range) when target is formula cell
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 07:00 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