map column a to column b

K

kalai

hi,
I am a newbie. how could map two columns in excel.

For example column a to column b. If i enter any value in any row of
column a that should be reflected in corresponding row of column b.
Please help me in this regard.

thanks,
r.kalaivanan
 
B

Bob Phillips

Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A:A" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Target
.Offset(0, 1).Value = .Value
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

David Biddulph

In B1 put the formula =A1
If you want B1 to stay blank until A1 is filled in, then use
=IF(A1="","",A1)

Copy down as far as you like.
 
K

kalai

In B1 put the formula =A1
If you want B1 to stay blank until A1 is filled in, then use
=IF(A1="","",A1)

Copy down as far as you like.
--
David Biddulph








- Show quoted text -

hi david,
thanks for ur reply. actually u want me copy the formula in each and
every row upto the one i needed, which is specific to one particular
row and column. but what i wanted is a single formula or that need to
written once for whole of the two columns. the data entry may goes
upto nth row which i did not know. so whenever i enter a value in a
row say a225, the corresponding value should be reflected in b225.
Is there any workaround for this.

thanks,
r.kalaivanan
 
D

David Biddulph

A number of ways:

Select cell B1. Edit/ Copy (or CTRL-C). Select cells B2 to B225. Edit/
Paste (or CTRL-V).
or
Hover the cursor over the bottom right-hand corner of cell B1 so that the
pointer turns to a + sign. Click, & while holding the mouse button down
drag that + sign down across cells B2 to B225.

You did say you were a newbie, so perhaps you need some Excel basics
training, either a book such as "Excel for Dummies" or a basic course
(either on-line or elsewhere)? If you're after a recommendation for such
instruction, you might try the microsoft.public.excel.newusers newsgroup.
--
David Biddulph

kalai said:
thanks for ur reply. actually u want me copy the formula in each and
every row upto the one i needed, which is specific to one particular
row and column. but what i wanted is a single formula or that need to
written once for whole of the two columns. the data entry may goes
upto nth row which i did not know. so whenever i enter a value in a
row say a225, the corresponding value should be reflected in b225.
Is there any workaround for this.
 

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