A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Looping Format



 
 
Thread Tools Display Modes
  #1  
Old May 17th, 2010, 04:52 PM posted to microsoft.public.excel.worksheet.functions
Totoshi
external usenet poster
 
Posts: 3
Default Looping Format

Hi everyone,

I need some help a looping format, here is the problem:

I have data in col A B C , and i need each time both A1 B1 C1 is equal
to zero the text color is white, and so on until A100 B100 C100; i
have thinking in someting but is not working...

Can you help me....


Thanks


______________________

Sub color()
Dim icol As Integer
Dim ilin As Integer
Dim r As Range

ilin = 0
icol = 0
Sheets("Certificado").Select
For ilin = 0 To ilin = 114
If (r.Cells(ilin, 1) = 0 And r.Cells(ilin, 2) = 0 And r.Cells(ilin,
3) = 0) Then
'Range(Cells(ilin1, 1), Cells(ilin1, 2), Cells(ilin1, 3)).Select
Font.ColorIndex = 2
End If
Next ilin
  #2  
Old May 17th, 2010, 05:37 PM posted to microsoft.public.excel.worksheet.functions
Luke M[_4_]
external usenet poster
 
Posts: 451
Default Looping Format

With all cells selected, cell A1 active, conditional format formula is:
=AND($A1=$B1,$A1=$C1,$A1=0)
format to white text.

This format can be applied to all cells/rows within selection.

--
Best Regards,

Luke M
"Totoshi" wrote in message
...
Hi everyone,

I need some help a looping format, here is the problem:

I have data in col A B C , and i need each time both A1 B1 C1 is equal
to zero the text color is white, and so on until A100 B100 C100; i
have thinking in someting but is not working...

Can you help me....


Thanks


______________________

Sub color()
Dim icol As Integer
Dim ilin As Integer
Dim r As Range

ilin = 0
icol = 0
Sheets("Certificado").Select
For ilin = 0 To ilin = 114
If (r.Cells(ilin, 1) = 0 And r.Cells(ilin, 2) = 0 And r.Cells(ilin,
3) = 0) Then
'Range(Cells(ilin1, 1), Cells(ilin1, 2), Cells(ilin1, 3)).Select
Font.ColorIndex = 2
End If
Next ilin



  #3  
Old May 17th, 2010, 05:54 PM posted to microsoft.public.excel.worksheet.functions
Rick Rothstein[_2_]
external usenet poster
 
Posts: 2,013
Default Looping Format

Why not just this...

=AND($A1=0,$B1=0,$C1=0)

....seems like that would work as well and the structure is much simpler.

--
Rick (MVP - Excel)



"Luke M" wrote in message
...
With all cells selected, cell A1 active, conditional format formula is:
=AND($A1=$B1,$A1=$C1,$A1=0)
format to white text.

This format can be applied to all cells/rows within selection.

--
Best Regards,

Luke M
"Totoshi" wrote in message
...
Hi everyone,

I need some help a looping format, here is the problem:

I have data in col A B C , and i need each time both A1 B1 C1 is equal
to zero the text color is white, and so on until A100 B100 C100; i
have thinking in someting but is not working...

Can you help me....


Thanks


______________________

Sub color()
Dim icol As Integer
Dim ilin As Integer
Dim r As Range

ilin = 0
icol = 0
Sheets("Certificado").Select
For ilin = 0 To ilin = 114
If (r.Cells(ilin, 1) = 0 And r.Cells(ilin, 2) = 0 And r.Cells(ilin,
3) = 0) Then
'Range(Cells(ilin1, 1), Cells(ilin1, 2), Cells(ilin1, 3)).Select
Font.ColorIndex = 2
End If
Next ilin



  #4  
Old May 17th, 2010, 06:07 PM posted to microsoft.public.excel.worksheet.functions
Totoshi
external usenet poster
 
Posts: 3
Default Looping Format

It works just fine,


Thanks
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


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