Value in column

P

Paul Tikken

I'm using Excel 2003

If a cell in column A has a certain value, I would like that automatically
the cell (in the same row as the required value in column A) in column G is
set that it equals the value that is going to be entered in column E

So if I enter XX in cel A7 I would like that Cell G7 is set that it will
equal the value entered in cell E7

Who can help me?

Paul
 
M

Matt Richardson

I'm using Excel 2003

If a cell in column A has a certain value, I would like that automatically
the cell (in the same row as the required value in column A) in column G is
set that it equals the value that is going to be entered in column E

So if I enter XX in cel A7 I would like that Cell G7 is set that it will
equal the value entered in cell E7

Who can help me?

Paul

Using your example of "XX" you could use a formula like this in cell
G7:-

=if(A7="XX",E7,"")

This simple IF function will display the contents of cell E7 if the A7
is equal to "XX", and will show nothing if A7 doesnt. With a bit of
work you can customise this to your specifications.

Let us know how you get on.

Regards,
Matt Richardson
http://teachr.blogspot.com
 
P

Paul Tikken

Matt,

Thanks for your quick response but it not exactly what I'm looking for. I'm
looking for some kind of a code that makes this happen automatically. Your
solution I'll have to paste in every cell, and if I'm changing something in
those cells I'm loosing the formula.

Can you help me?

Paul
 
M

Mike H

Paul,

I'm confused so this give 2 options. The commented out line sets G to equal
A when a cell in A changes. The other line sets G to equal E when a cell in A
changes

It's worksheet code so right vlick the sheet tab, view code and paste this
in:-

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("A1:A100")) Is Nothing Then 'Change to suit
Application.EnableEvents = False
'Target.Offset(0, 6).Value = Target.Value
Target.Offset(0, 6).Value = Target.Offset(0, 4).Value
Application.EnableEvents = True
End If
End Sub

Mike
 
P

Paul Tikken

Mike,

It's not working at all.

What I'm trying to achieve is that when I change a cell in column A, let's
say A5 (but the code should work for any cell in column A), into a certain
pre-set value. e.g. "XX", "Y" and "BBB" should trigger the code, but any
other input should not trigger the code.

When I enter one of those pre-set values, the cell of the same row in column
H (so H5 in this case) should equal the entries that I'm going to enter in to
column F (F5 in this case)

When I remove these pre-set values entered in column A, the entire process
should be undone.

Hope to have clearified some things,

Thanks in advance,

Paul.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top