Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Amit
 
Posts: n/a
Default copying a cell to another cell automatically

Hi,
I'm trying to set up my worksheet so that if the value in column E is
changed to 100%, the value in column A of that row automatically changes to
100, regardless of its original value. At the same time, I don't want to
lock down column A - the user can enter any value in here when E is not
100%. How do I go about doing this? Do I need to write a macro?
Thanks!
Amit


  #2   Report Post  
David Jessop
 
Posts: n/a
Default

Hi,

You'll have to do this as a little macro. Go into the VB editor and add the
following into the relevant Sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target = 100 Then
Cells(Target.Row, 1) = 100
End If
End Sub

You might want to check for ABS (target - 100) < some small number rather
than equality.

HTH, David Jessop

"Amit" wrote:

Hi,
I'm trying to set up my worksheet so that if the value in column E is
changed to 100%, the value in column A of that row automatically changes to
100, regardless of its original value. At the same time, I don't want to
lock down column A - the user can enter any value in here when E is not
100%. How do I go about doing this? Do I need to write a macro?
Thanks!
Amit



  #3   Report Post  
Amit
 
Posts: n/a
Default

Awesome, thanks!


"David Jessop" wrote in message
...
Hi,

You'll have to do this as a little macro. Go into the VB editor and add

the
following into the relevant Sheet.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target = 100 Then
Cells(Target.Row, 1) = 100
End If
End Sub

You might want to check for ABS (target - 100) < some small number rather
than equality.

HTH, David Jessop

"Amit" wrote:

Hi,
I'm trying to set up my worksheet so that if the value in column E is
changed to 100%, the value in column A of that row automatically changes

to
100, regardless of its original value. At the same time, I don't want to
lock down column A - the user can enter any value in here when E is not
100%. How do I go about doing this? Do I need to write a macro?
Thanks!
Amit





Reply
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
Can Comments be automatically converted to text cell values? tomdog61 Excel Discussion (Misc queries) 1 January 23rd 05 10:38 PM
Excel: How do I enter a date in one cell & automatically dates adj Shannon Excel Discussion (Misc queries) 4 January 12th 05 01:51 AM
Excel merged cell - can it automatically expand as text is typed? Joanne (JAS) New Users to Excel 2 January 8th 05 01:11 AM
automatically insert system time in a cell PM Excel Discussion (Misc queries) 2 December 30th 04 05:56 PM
prevent 4/5 in a cell automatically transfer to a date format kei Excel Discussion (Misc queries) 3 December 9th 04 12:52 PM


All times are GMT +1. The time now is 01:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"