Hi,
I have a one excel workbook which has multiple worksheet,In each sheet i need to find (" and replace it with ' (single code) automatically.Can some one suggest me a macro or vba code.I have attached the workbook
Thanks
Vinutha
Hi,
I have a one excel workbook which has multiple worksheet,In each sheet i need to find (" and replace it with ' (single code) automatically.Can some one suggest me a macro or vba code.I have attached the workbook
Thanks
Vinutha
Here you go
Please Login or Register to view this content.
Thanks,
Mike
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved.
in the sheet name LEGAL_LOT_ID, there are also " in column "E"
Good catch AB33. This should do it.
Please Login or Register to view this content.
Mike,
your first code also works on this
Please Login or Register to view this content.
Hi Mike ,
Thanks for your reply,I will save the above code in macro,and call this macro through VBA script .The VBA script will run the macro.my question is where i will give the input filename ,so it will pick only the partcular workbook and run the macro on it,because ,i have lots of incoming reports in the folder and i want to apply this macro on only excel book name Result as i have attached in the above thread.I dont want to run the macro manually
.I am calling it through VBA script.
Thanks,
Vinutha
hi Mike,
I have saved this below code in excel sheet find.xlsm
Sub abc()
Dim ws As Worksheet
For Each ws In Worksheets
ws.Range("a1").CurrentRegion.Replace What:="(""", Replacement:="'", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Next
End Sub.
Later i want to run this macro on result.xlsx workbook.I cant save this macro on the result.xlsx.because each time the result sheet is getting generated in the folder.So i wanted the macro to be on different sheet and call it on the result sheet thorugh VB script:
Option Explicit
Dim xlApp, xlBook
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("D:\test\Result.xlsx", 0, True)
xlApp.Run "'d:\test\find.xlsm'!replace"
Set xlBook = Nothing
Set xlApp = Nothing
xlApp.DisplayAlerts = False
xlApp.ActiveWorkbook.Close
xlApp.Quit
Set xlBook = Nothing
Set xlApp = Nothing
End Sub
this is the code which i tried,but no luck...can you please correct this code
Why not just save the code in your Personal macro Workbook. Then when you open the Results.xlsx file hit Alt F8 and youll see the macro there.
Please Login or Register to view this content.
Last edited by mike7952; 10-11-2012 at 09:01 AM.
there should not be any manual intervention,everything should be automated.I am using an application which will call the vbscript and it should replace the characters in the excel sheet,because these reports goes to client,where they can only view the file.We will not be having access to the folder where these result sheets are getting generated.
please help me on automating :-(
there should not be any manual intervention,everything should be automated.I am using an application which will call the vbscript and it should replace the characters in the excel sheet,because these reports goes to client,where they can only view the file.We will not be having access to the folder where these result sheets are getting generated.
please help me on automating :-(
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks