Hello,
I am using Excel 2007 running on Windows 7.
There are =CONCATENATE() formulas anywhere in column C. I want to find these CONCATENATE formulas & convert the concatenated stuff to 'normal' text. I'm using a crude code which does the job but it's too slow as it involves copy & paste. My crude code is below:-
Could you propose a more efficient code please?
Alternatively, I am using the following code to find for =TODAY() formulas & converting these formulas to 'normal' text format. Could you show me how to modify this code so that I can use it to find =CONCATENATE() & convert the concatenated stuff to 'normal' text please?
Thanks a lot
I am using Excel 2007 running on Windows 7.
There are =CONCATENATE() formulas anywhere in column C. I want to find these CONCATENATE formulas & convert the concatenated stuff to 'normal' text. I'm using a crude code which does the job but it's too slow as it involves copy & paste. My crude code is below:-
Code:
Sub paste_special_full_add()
'copies the concatenation & pastes special it back in column c without the formatting
Dim c As Range
For Each c In ActiveSheet.Range("C:C")
c.Copy
If c.Value <> "" Then c.PasteSpecial xlPasteValuesAndNumberFormats, xlPasteSpecialOperationNone, SkipBlanks:=False, Transpose:=False
Next c
End Sub
Alternatively, I am using the following code to find for =TODAY() formulas & converting these formulas to 'normal' text format. Could you show me how to modify this code so that I can use it to find =CONCATENATE() & convert the concatenated stuff to 'normal' text please?
Code:
Sub DateToString()
Dim szDate As String, c As Range
On Error Resume Next
For Each c In Columns("B:B").SpecialCells(xlCellTypeFormulas)
If (IsDate(c.Value)) Then
szDate = Format(c.Value, "yyyy-mm-dd")
c.NumberFormat = "@"
c.Value = szDate
End If
Next c
End Sub
Thanks a lot