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: 334
Default New to programming VB in Excel

Hello,

I'm new to programming in Excel and I'm trying to learn how to write VB in
Excel and then run the macro. I'm using Excel 2003 and I'm trying to start
with something simple. Here is what I'm trying but I think there is a syntex
error:

I'm trying to change the color background for cell G4 based on the value of
cell F4. If G4 is less than F4, I want the background of G4 to change to Red
indicating this cell is not completed. If it is = to F4, I want G4
background to change to Green indicating it is completed.

Here is my code:

If (F4 < G4) Then G4.Background = vbRed
Else: G4.Background = vbGreen
End If

Thanks in advance from your help.
 
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
excel programming Wendy Elizabeth Charts and Charting in Excel 2 June 19th 07 04:21 AM
Excel/VBA programming Carlos A Excel Discussion (Misc queries) 2 July 24th 05 10:21 PM
Very New in Excel Programming Wael Mabsout Excel Programming 0 January 18th 04 07:26 PM
Excel Programming aly1cat[_2_] Excel Programming 3 January 7th 04 03:56 PM
Excel programming using VBA Dave Peterson[_3_] Excel Programming 1 October 8th 03 02:39 AM


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