ndendrinos
Well-known Member
- Joined
- Jan 17, 2003
- Messages
- 1,694
I have 2 workbooks open Workbook A and B
I copy a cell that contains an account number from Workbook A.
e.g. 5180807578203110 (always sixteen digits)
I go to Workbook B and double click in a cell and the account number is pasted
The account number will also change from:
5180807578203110 to
# 518***7578203110
This is the macro I have put together and the R1C1 part needs to work on any account
number (in other words with the Selection)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveSheet.Paste
ActiveCell.FormulaR1C1 = "# 518***7578203110"
End Sub
I copy a cell that contains an account number from Workbook A.
e.g. 5180807578203110 (always sixteen digits)
I go to Workbook B and double click in a cell and the account number is pasted
The account number will also change from:
5180807578203110 to
# 518***7578203110
This is the macro I have put together and the R1C1 part needs to work on any account
number (in other words with the Selection)
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveSheet.Paste
ActiveCell.FormulaR1C1 = "# 518***7578203110"
End Sub