+ Reply to Thread
Results 1 to 6 of 6

If cell in row is greater than cell in another row, then cannot preform macro?

  1. #1
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    If cell in row is greater than cell in another row, then cannot preform macro?

    Hello!

    I have been trying to add a contingency to the top of my macro that makes it so if the value in column F is greater than the value in the same row in column G, then it comes up with a message box and exits the sub.
    From research on the internet, here is what I have right now:

    Please Login or Register  to view this content.
    It still won't run properly though. Any suggestions?

  2. #2
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: If cell in row is greater than cell in another row, then cannot preform macro?

    I assume that this is running in a Worksheet_Change() event handler. Try it something like this:

    Please Login or Register  to view this content.
    WBD

  3. #3
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Re: If cell in row is greater than cell in another row, then cannot preform macro?

    Hello! That came back with the error: "Object required" for
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Re: If cell in row is greater than cell in another row, then cannot preform macro?

    Here is the example workbook I am using
    Attached Files Attached Files

  5. #5
    Forum Expert WideBoyDixon's Avatar
    Join Date
    10-03-2016
    Location
    Sheffield, UK
    MS-Off Ver
    365
    Posts
    2,182

    Re: If cell in row is greater than cell in another row, then cannot preform macro?

    Ah. OK. Try it like this then:

    Please Login or Register  to view this content.
    WBD

  6. #6
    Registered User
    Join Date
    08-01-2018
    Location
    Ann Arbor, MI
    MS-Off Ver
    2016
    Posts
    96

    Re: If cell in row is greater than cell in another row, then cannot preform macro?

    That worked perfectly. Thank you!

+ 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] Running another Macro if a cell value is greater than 0
    By jshaw82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-04-2014, 11:11 AM
  2. [SOLVED] Macro to print only lines with cell value greater than zero
    By Matt Cowan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-14-2013, 11:59 PM
  3. [SOLVED] Macro to Move Row if Cell data is Greater than 5
    By michaelpair in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 03:50 PM
  4. [SOLVED] Macro to highlight a cell if greater
    By ISUCyclones in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-06-2012, 04:17 PM
  5. Can a macro recognize a number and then preform 2 tasks?
    By Nemo5 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-25-2009, 06:48 PM
  6. Macro to Insert Row if Cell is less than and next cell is greater than or equal to
    By jennifer.l.dean in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2009, 08:35 AM
  7. [SOLVED] Preform alphabetical sort without formula in cell changing
    By ace in forum Excel General
    Replies: 1
    Last Post: 04-16-2005, 09:08 AM

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