When click on a column of postcodes to copy a certain value to a cell in another sheet

chrisandsally

New Member
Joined
Feb 6, 2015
Messages
4
Hello all professors out there.

I have searched the forums but at a loss on this one. If it can be done via formulas rather than VBA great but willing to try anything at this point!

I have two sheets. The first sheet contains a long list of Postcodes of our customers and I am trying to do the following.

When I click or double click on a postcode on the 1st sheet it places a value say "AREA1" in a cell in another sheet.

Any ideas?

Thank you
 
Let's say your postcodes is in Sheet1, say A1:A10
and "Area1" will go in a cell on Sheet2, say A1
place this code in Sheet1 vba window

Rich (BB code):
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
  If target.address = Range ("A1:A10") Then
  Sheets("Sheet2").range ("A1") = activecell.value
else
endif
End Sub

I apologize if something backfires, on iPhone and can't test.
Jason
 
Upvote 0

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top