Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default HOW TO USE REPLACE OR CREATE A MACRO TO HIGHTLIGHT THE NEGATIVE VA

I HAVE COLUMNS FULL OF MIX NUMBERS. I WAOULD LIKE TO HIGHTLIGHT THE NEGATIVE
NUMBERS BY RUNNING THE MACRO. THE REPLACE DOESNT HAVE A LOOK IN VALUE CHOICE.
CAN SOMEONE PLEASE HELP ME WITH THIS??
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 73
Default HOW TO USE REPLACE OR CREATE A MACRO TO HIGHTLIGHT THE NEGATIVE VA

On Mar 19, 1:08 pm, VARSANG wrote:
I HAVE COLUMNS FULL OF MIX NUMBERS. I WAOULD LIKE TO HIGHTLIGHT THE NEGATIVE
NUMBERS BY RUNNING THE MACRO. THE REPLACE DOESNT HAVE A LOOK IN VALUE CHOICE.
CAN SOMEONE PLEASE HELP ME WITH THIS??


Varsang,

You can look into doing conditional formatting in the Excel
application.

In VBA you can do something like the following (provided that your
data is contiguous).

Option Explicit

Sub colorMacro()
Dim a
Dim counter

counter = Range("a1").CurrentRegion.Rows.Count

For a = 1 To counter
If Range("a" & a).Value < 0 Then
Range("a" & a).Interior.ColorIndex = 3
End If
Next

End Sub

Matt

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create a macro to replace one line with a few new lines? Binyaaust Excel Discussion (Misc queries) 2 June 18th 08 01:43 AM
How to create a massive find & replace macro JWCrosby Excel Programming 5 July 18th 06 08:35 PM
hightlight table or create borders cigarette[_4_] Excel Programming 0 August 24th 04 03:21 PM
Macro to replace negative numbers by 0 William[_2_] Excel Programming 0 September 1st 03 05:52 AM
Macro to replace negative numbers by 0 Patrick Molloy[_4_] Excel Programming 0 September 1st 03 05:27 AM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"