+ Reply to Thread
Results 1 to 15 of 15

Worksheet change event if in range negative value find then higlight the value

  1. #1
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Worksheet change event if in range negative value find then higlight the value

    Hi
    With worksheet event
    Higlight the range d10:d1000 if negative value found in range f10:f1000

    For example
    I type in a5 and f5 value <0 then highlight the cell a5 and all cells of ranged10:d1000 if value = a5
    Use Code-Tags for showing your code :
    Please mark your question Solved if there has been offered a solution that works fine for you
    If You like solutions provided by anyone, feel free to add reputation using STAR *

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hello HaroonSid,

    Have you considered using Conditional Formatting instead? It would be much simpler, quick and effective.

    Regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    Hello, guru ji
    How r you?

    I am using conditional formmating but i want to do this with vba

  4. #4
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    My workbook has been crashed due to conditional formatring
    So i am little afraid using cf

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hi HaroonSid,

    My workbook has been crashed due to conditional formatting
    There must be a simple way to solve that problem, please could you attach a sample workbook.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  6. #6
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    Hi, dear sir
    please see this code. this code meets with my need

    this code compares two ranges, d3:d300 and f4:f100
    if any value in f4:f100 don't match with range d3:d300 then this code highlight the range value of range f4:f100

    now my need here is if range Highlight the range d10:d1000 if negative value found in range f10:f1000 in same sheet

    and look the sample workbook too please
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hi HaroonSid,

    Please try the following Code,

    In a Standard Module;

    Please Login or Register  to view this content.
    In Sheet1. Change Event;

    Please Login or Register  to view this content.
    Sample Workbook to Follow.

    Kind Regards.
    Attached Files Attached Files
    Last edited by Winon; 06-18-2017 at 02:19 PM. Reason: Uploading Workbook

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hello HaroonSid,

    Perhaps the amended attached sample Workbook will suit you better, since I got no reply from you after my last Post.

    Kind Regards.
    Attached Files Attached Files

  9. #9
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    Yes
    this is perfect

    Mr. Winon Sir

    i was busy so no reply
    sorry for that

    thank you

  10. #10
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    i need little change in this code

    highlight all cells of less then 0 (-1, -2, -15, -18, -500 any minus value) not only -1 of range Column D

    Please Login or Register  to view this content.
    Last edited by HaroonSid; 06-19-2017 at 07:46 AM.

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    O.K. HaroonSid,

    Just change your Module to;

    Please Login or Register  to view this content.
    Regards.
    Attached Files Attached Files

  12. #12
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    Ok
    Thank you sir winon

    Will try tomorrow InshaAllah

  13. #13
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hi HaroonSid,

    I checked it all again, and I think the following Module Code will suit you better;

    Please Login or Register  to view this content.
    You may now select which ever solution suits you best.

    വരാനിരിക്കുന്നു.
    Attached Files Attached Files

  14. #14
    Forum Contributor HaroonSid's Avatar
    Join Date
    02-28-2014
    Location
    india
    MS-Off Ver
    Excel 2013
    Posts
    2,080

    Re: Worksheet change event if in range negative value find then higlight the value

    Ekdum Perfect

    thank you once again

  15. #15
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Worksheet change event if in range negative value find then higlight the value

    Hello HaroonSid,

    You are welcome.

    Thank you for the feedback and the Rep.

    With your issue confirmed as Solved we can now finalize the Module Code.

    Please replace your Code with the content below;

    Please Login or Register  to view this content.
    Kind Regards.

+ 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. How to make a Worksheet Calculate event when a range of cells change?
    By Invicta084 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-15-2014, 07:20 PM
  2. Higlight duplicates positive and negative numbers
    By magman1984 in forum Excel - New Users/Basics
    Replies: 9
    Last Post: 02-13-2014, 01:07 PM
  3. [SOLVED] need help setting range in worksheet change event
    By ShoshanaM in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-30-2012, 04:07 PM
  4. Worksheet change event for range of cells and data validation
    By santosh123 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-08-2012, 07:38 AM
  5. Find first negative result of a range and display cell info in different worksheet
    By verticalquiksand in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-11-2011, 05:55 PM
  6. Worksheet Change Event-change the range in my VBA
    By systemx in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2006, 05:00 AM
  7. [SOLVED] Worksheet Change event code moved to Worksheet Calculate event... and it's not working
    By KimberlyC in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-23-2005, 06:05 PM
  8. Worksheet Change Event-when a cell with a certain range of cells) are changed?
    By Steph in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-25-2005, 07:06 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