Thread: cell change
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default cell change

Its not clear from your description exactly what you're trying to put into
column B

However, the following code will express the value entered in any of cells
A1:A5 as a ratio to A6....put this in the sheet's code page

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A1:A5")) Is Nothing Then

Target.Offset(0, 1).Value = Target / Range("A6")

End If
End Sub



"Monique" wrote:

I have a range of cells that will users can put information in. If anyone of
those cells are entered then in a separate section of the same worksheet,
those numbers are used to calculate a percentage.

A B

1
2
3
4
5

Column B1 = A1 * A3
Column B2 = A5 * A2

etc etc.

I want Column B to automatically generate the answer upon a change in Column
A.

I have read that worksheet_change would work.. but i'm not sure how that
will work with implementation of change in several different cells.

Any help would be greatly appreciated.
Thanks