Total Pageviews

Thursday, 8 June 2023

MACROS : How to Remove tabs and carriage returns from worksheet cells in Excel

Remove tabs and carriage returns from worksheet cells

Sub CleanUp()

Dim TheCell As Range

 On Error Resume Next


 For Each TheCell In ActiveSheet.UsedRange

   With TheCell

     If .HasFormula = False Then

       .Value = Application.WorksheetFunction.Clean(.Value)

     End If

   End With

 Next TheCell

End Sub

 

No comments:

Post a Comment

FUSION: Purchasing Query

  1) ---------CPA to PO Amount---------- select poh.segment1, (select sum(nvl(cpol.quantity,1)* cpol.unit_price) from po_headers_all cpoh,po...