Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Select the entire row

I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Select the entire row

Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Select the entire row

Hi,
I want to highlight the entire row in which the word cash appears.

Shantanu

Bob Phillips wrote:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Select the entire row

With Selection.EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & ActiveCell.Address(False,
True) & "=""CASH"""
.FormatConditions(1).Font.ColorIndex = 45
End With



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
Hi,
I want to highlight the entire row in which the word cash appears.

Shantanu

Bob Phillips wrote:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual,

_
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Select the entire row

Thanks.
Now I want to color alternate rows using conditional formatting and I
can do it manually by using this formulae...
=ODD(ROW())=ROW()

How do I add it in a macro?


Bob Phillips wrote:
With Selection.EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & ActiveCell.Address(False,
True) & "=""CASH"""
.FormatConditions(1).Font.ColorIndex = 45
End With



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
Hi,
I want to highlight the entire row in which the word cash appears.

Shantanu

Bob Phillips wrote:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual,

_
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default Select the entire row

With Selection.EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=ODD(ROW())=ROW()"
.FormatConditions(1).Font.ColorIndex = 45
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
oups.com...
Thanks.
Now I want to color alternate rows using conditional formatting and I
can do it manually by using this formulae...
=ODD(ROW())=ROW()

How do I add it in a macro?


Bob Phillips wrote:
With Selection.EntireRow
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:="=" & ActiveCell.Address(False,
True) & "=""CASH"""
.FormatConditions(1).Font.ColorIndex = 45
End With



--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
Hi,
I want to highlight the entire row in which the word cash appears.

Shantanu

Bob Phillips wrote:
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,

Operator:=xlEqual,
_
Formula1:="CASH"
Selection.FormatConditions(1).Font.ColorIndex = 345


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"shantanu oak" wrote in message
ups.com...
I want to select the entire row and change the color of the row

where
the word "CASH" is in a single cell.

The following code of the macro is not working.

'
Selection.FormatConditions.Delete
Selection.FormatConditions.Add Type:=xlCellValue,
Operator:=xlEqual, _
Formula1:="=""CASH"""
Rows(FormatConditions(1)).Select
Selection.Font.ColorIndex = 45


Please guide.





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
Currency to Text mytipi Excel Worksheet Functions 1 February 21st 06 11:43 PM
Conditional formatting applicable to entire column jackalx Excel Worksheet Functions 1 May 26th 05 05:20 PM
How to apply a format to an entire workbook Peo Sjoblom Excel Worksheet Functions 0 May 17th 05 06:11 PM
In Excel 2000, How do you select the whole of a worksheet (Select. Rascal Excel Discussion (Misc queries) 1 March 4th 05 11:59 PM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


All times are GMT +1. The time now is 02:40 AM.

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

About Us

"It's about Microsoft Excel"