Home |
Search |
Today's Posts |
#2
![]() |
|||
|
|||
![]() Quote:
You need to select a range (you may select a non contiguous range as well). The macro will put the cell's address and will concatenate the cell's content. This works well with the Merged cells (top left corner's range address is used). It ignores any blank cell in your selection. Let me know if you face any issues. To get this working. Put this code into a standard VBA module. Make a selection and run the macro (Alt + F8). Option Explicit Sub AddTitle() Dim Temp As Variant Dim cell As Range If TypeName(Selection) < "Range" Then MsgBox "Select the range to work with.", vbCritical Exit Sub End If For Each cell In Selection.Cells If Not cell.Value = "" Then Temp = " " & cell.Value cell.Value = cell.Address(False, False, xlA1) & Temp End If Next cell End Sub Thank You, Prashant |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I Reference another cell's content including its format | Excel Worksheet Functions | |||
Replacing Part of a Cell's Content | Excel Worksheet Functions | |||
Need to refer to a cell's address, not it's content... | Excel Discussion (Misc queries) | |||
cell's reference value dependent on another cell's value | Excel Programming | |||
Changing named range reference depending on a cell's content | Excel Discussion (Misc queries) |