Convert Concatenated Stuff Back to Text Format

dgr

Board Regular
Joined
Apr 24, 2005
Messages
176
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:-
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
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?
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 :-)
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try this approach, which is the same as copying & pasting special/values:

Code:
Sub ColCtoVal()
Range("C:C").Value = Range("C:C").Value
End Sub
 
Upvote 0
Thanks a lot rallcon for teaching me this new trick. I appreciate your help. The code works fine :-)
 
Upvote 0

Forum statistics

Threads
1,226,218
Messages
6,189,693
Members
453,563
Latest member
Aswathimsanil

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