1) Right-click on TOTALPLANT sheet tab and select VIEW CODE.
2) In the window that appears, paste in this code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Font.Bold = True Then _
Target.Copy Sheets("UNIT").Range("B" & Rows.Count).End(xlUp).Offset(1, 0)
End Sub
3) Press Alt-Q to close the VB window.
4) Save your sheet.
Now anytime you select a BOLD cell on that sheet, it will be copied to the next empty cell in column B on the UNIT page.
If you really just want the last bold value selected to always be copied to cell B7 (same cell over and over), then use this code instead:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Font.Bold = True Then _
Target.Copy Sheets("UNIT").Range("B7")
End Sub
CAVEATS:
- Using sheet-event codes like this will cost you your UNDO command on that sheet.
- This will require you to enable macros when opening your sheet.
Bookmarks