+ Reply to Thread
Results 1 to 3 of 3

VBA: notify when number switches from positive to negative and vice versa (Excel)

Hybrid View

zeno1 VBA: notify when number... 05-07-2012, 05:19 PM
Leith Ross Re: VBA: notify when number... 05-07-2012, 09:19 PM
zeno1 Re: VBA: notify when number... 05-08-2012, 11:56 AM
  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    VBA: notify when number switches from positive to negative and vice versa (Excel)

    Hello,
    I have a column in Excel with both positive and negative numbers. I would like to receive through VBA a notification on screen every time that the list of numbers switches sign. The notification is different if it goes from positive to negative than from negative to positive. It would also have to indicate at what row that change happens.
    Thank you for your help.
    Last edited by zeno1; 05-07-2012 at 05:37 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259

    Re: VBA: notify when number switches from positive to negative and vice versa (Excel)

    Hello zeno1,

    It would be easier to implement this functionality using Data Validation rather than VBA and probably faster.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: VBA: notify when number switches from positive to negative and vice versa (Excel)

    Hello Leith,
    Thank you for your suggestion. I am processing high volume of data, and therefore am using VBA for calculations in earlier steps, to reach eventually the last step, which is evaluation of switches from positive to negative and vice versa.
    I'm reading on how to implement Data Validation. I assume I would use a Custom setting in Data Validation and then define a formula.
    As an example, if I evaluate say column D from top to bottom, what formula could I use to indicate both type of switches?
    Thanks so much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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