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: 53
Default Color contents of a cell accessed by a function?

Ideally i would like to color the contents of the cell accessed by the call
of my function "findnewnominal(...)" The reason for this is the function is
called many times on a range table range and I would like to know at a
glance which rows in the table hadn't yet been accessed by a calls of the
function.

My macro to date (which works fine is)


Function FindOldNominal(NomCode, definedRange)

FindOldNominal = Worksheetfunction.VLookup(NomCode, definedRange, 5, false)
EndFunction





but if i want to color the cell accessed I imagine i have to use something
like the following? (my attempt of something pseudocode)


Function FindOldNominal(NomCode, definedRange)

Activecell = reference(Worksheetfunction.VLookup(NomCode, definedRange, 5,
false))
Activecell.Interior.ColorIndex = 3 (i.e red etc)

FindOldNominal = Worksheetfunction.VLookup(NomCode, definedRange, 5, false)
EndFunction


I appreciate the above is probably non sensical but know little about excel
functions and just wanted to make as clear as possible what i wanted to do.
Any help would be greatly appreciated.

Thanks
James


 
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
Moving cell contents to new cell loses background color in old cel John Excel Discussion (Misc queries) 4 May 11th 09 01:56 AM
how to change color of cell based on contents of cell robert wake Excel Discussion (Misc queries) 3 February 24th 09 08:04 PM
How can I copy down, the contents of a cell and not color wade_aus10 Excel Discussion (Misc queries) 3 November 29th 06 12:35 AM
Transferring contents and color of cell Les Excel Worksheet Functions 3 April 23rd 06 06:19 PM
Change Cell Color dependent on Cell Contents Bill Excel Programming 4 March 15th 05 04:33 PM


All times are GMT +1. The time now is 07:27 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"