#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default Change a cell color

I have a c# program that builds a 2-d string array and copies it to a range
with a single statement similar to: oRange.set_Value( Type.Missing, myArray );
If my array looked like [0,0]="FOO1" [0,1]="BAR1" [1,0]="FOO2" [1,1]="BAR2",
then in Excel I end up with A1=FOO1, B1=BAR1, A2=FOO2, B2=BAR2

Suppose I want some text in color or italics, is there any formula or
function that I can embed in the text, e.g. "=ITALIC(FOO1)" that would give
the desired formatting when the array is read into the spreadsheet?

I need a solution that does not involve VBA, and everything that I have
googled uses Excel conditional formatting or vba, which won't help me.

Hope someone can help.
Regds
--
G.R.Stanbury
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Change a cell color

You don't need VBA or conditional formatting to set either a cell's font or
background color. If your c# code can fill a cell with text it should also
be able to:

Format Cells... Font Italic
--
Gary''s Student - gsnu200714
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default Change a cell color

Thanks for the reply. Yes, I know that I can do the equivalent on a
cell-by-cell basis, which is what I think I will end up doing. But as reading
a large string array into a range with a single command is so fast, I would
have preferred it if this array could also have contained the formatting,
which would be dramatically faster than iterating through thousands of cells.
Thanks anyway

--
G.R.Stanbury


"Gary''s Student" wrote:

You don't need VBA or conditional formatting to set either a cell's font or
background color. If your c# code can fill a cell with text it should also
be able to:

Format Cells... Font Italic
--
Gary''s Student - gsnu200714

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
Change cell color but it doesn't change Threes a crowd Excel Worksheet Functions 3 March 8th 07 10:13 PM
Excel: Syntax to change cell color based on color of another cell davew18 Excel Worksheet Functions 1 January 4th 07 01:24 PM
change cell color to red & then green when value change in 2 cel Innswood Excel Discussion (Misc queries) 0 July 24th 06 05:07 AM
change background row color with change of date in a cell Urszula Excel Discussion (Misc queries) 5 May 17th 06 07:56 AM
How to change the default Border, Font Color, and Cell Color Elijah Excel Discussion (Misc queries) 3 November 2nd 05 11:52 PM


All times are GMT +1. The time now is 09:59 PM.

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"