LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default I want to change the background color of cells, if value is a square root.


I'm looking to change the background color of cells in my
multiplication table, if the value in the cell is a square root.

Following is a portion of the code that a responder here provided on
my original post.

It works fine, and I've not had to change it, but I now wish to change
the cell's background color as described above.

I can't figure out from the book or from online help how I'm even
supposed to access the background's color, let alone change it in the
code.


For ir = 1 To noRows
For ic = 1 To noCols
Cells(ir, ic).Value = ir * ic
Next ic
Next ir

I suspect I have to enter something like "IF ir = ic, THEN . . . . "
before the "Next ic" statement.

TIA
Hrundi
 
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
square root Mitch Easterby Excel Worksheet Functions 6 May 22nd 09 03:00 AM
change background color in cells Joe Excel Worksheet Functions 4 November 6th 07 11:20 PM
How do I change a merged Cells background color rich Excel Programming 0 October 25th 06 03:33 PM
Change font and background color of several cells based on result of a formula Zenaida Excel Discussion (Misc queries) 2 April 27th 06 06:46 PM
Square Root in VBA Lucy Pearl Excel Programming 6 November 11th 05 05:28 PM


All times are GMT +1. The time now is 07:04 AM.

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"