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: 1
Default VBA Formula Syntax

Excel 2000
I'm new to using VBA with Excel.
What I am trying to do is change the formula in a cell based on which cell
is active (has focus) Such As:


Private Sub Worksheet_Selection Change( byval target as range)
If Target.Address = "$A$1" Then
Range("E1") = (B1+C1)/D1
Elseif Target.Address = "$A$2" Then
Range("E1") = (B2+C2)/D2
End If

The part I'm having problem with is the syntax for the formula:
Range("E1") = (B1+C1)/D1

Any help appreciated!
Dale

 
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
Formula syntax Dale G[_2_] Excel Discussion (Misc queries) 9 January 24th 10 06:08 PM
formula syntax. Babs Excel Discussion (Misc queries) 3 February 23rd 08 10:56 AM
Syntax of formula [email protected] Excel Worksheet Functions 2 December 15th 06 10:43 AM
Formula Syntax John Johns Excel Worksheet Functions 1 February 18th 06 12:18 PM
Formula syntax {;;;} Simplefi Excel Worksheet Functions 2 June 20th 05 05:48 PM


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