Skip to Content
Author's profile photo Former Member

Code to replace # with Blank

Here is the code to replace # with Blank

Sub SAPBEXonRefresh(queryID As String, resultArea As Range)

If queryID = “SAPBEXq0001” Then

resultArea.Select

‘Remove ‘#’

Selection.Cells.Replace What:=”#”, Replacement:=””, LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True

‘Remove ‘Not assigned’

Selection.Cells.Replace What:=”Not assigned”, Replacement:=””, LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True

End If

‘ Set focus back to top of results

resultArea(1, 1).Select

End Sub

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      Hi Naveen,

      Thanks for sharing the Code. Please let me know where to insert this Code.

      Thanks.

      Ram.

      Author's profile photo Kamal Mehta
      Kamal Mehta

      Hi Naveen ,

      Thanks

      As above need to know where to insert the same .

      If possible add more explanation as well.

      Thanks

      Kamal