LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
associates
 
Posts: n/a
Default help with coding in excel


Hi,

How do i write a code in VB to define names for cells in excel?

The following is the code i use but doesn't work.

worksheets("Data").Names.Add Name:="myF4",
RefersToR1C1:="=Sheet1!R4C4"
worksheets("Data").FormatConditions.Add Type:=xlCellValue,
Operator:=xlGreater, Formula1:="50"
worksheets("Data").FormatConditions(1).Interior.Co lorIndex = 6
worksheets("Data").FormatConditions.Add Type:=xlCellValue,
Operator:=xlLess, Formula1:="50"
worksheets("Data").FormatConditions(2).Interior.Co lorIndex = 42

Thank you for your help.


--
associates
------------------------------------------------------------------------
associates's Profile: http://www.excelforum.com/member.php...o&userid=35073
View this thread: http://www.excelforum.com/showthread...hreadid=549325

 
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
unhide menu bar in excel - just disappeared Sean Setting up and Configuration of Excel 12 April 4th 23 10:19 AM
Multiple Excel versions. Naveen Mukkelli Excel Discussion (Misc queries) 0 May 16th 06 12:55 AM
Excel Coding Error! Killer Excel Worksheet Functions 9 April 24th 06 01:51 AM
Simple coding in Excel craigs Excel Discussion (Misc queries) 1 January 17th 06 06:48 PM
Correct coding entry of VBA macros in Excel worksheet Jack R Excel Worksheet Functions 3 November 30th 05 11:00 AM


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