Take A1 and remove “*” located at the end.
=IF(ISERROR(IF(FIND(“,”,A1)>0,A1)),A1,IF(FIND(“,”,A1)>0,IF(ISERROR(FIND(“*”,A1)),A1,LEFT(A1,FIND(“*”,A1)-1))))
If A1 = “Doe, Jane*” it will return “Doe, Jane”
Take A1 and remove “*” located at the end.
=IF(ISERROR(IF(FIND(“,”,A1)>0,A1)),A1,IF(FIND(“,”,A1)>0,IF(ISERROR(FIND(“*”,A1)),A1,LEFT(A1,FIND(“*”,A1)-1))))
If A1 = “Doe, Jane*” it will return “Doe, Jane”
Enable/Disable alerts in a macro
Disable
Application.DisplayAlerts = False
Enable
Application.DisplayAlerts = True
Run a Macro when a workbook opens (must be placed in the “ThisWorkbook” Object):
Private Sub Workbook_Open()
MsgBox “Auto Calculation has been disabled.”
Application.Calculation = xlCalculationManual
End Sub
Paste Values only from current clipboard contents:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False
Switch to a different open workbook:
Windows(“file name.xlsm”).Activate
Clear the contents of the selected cells:
Selection.ClearContents
Open a workbook with a filenamelocation that is configured from another cell value:
ChDir “C:Usersuser_namefolder_onefolder_two”
Workbooks.Open Filename:= _”C:Usersuser_namefolder_namePart_of_file_name1″ & variable & “.xls”
Set a variable to a value in a cell(X=Row,Y=Column):
variable_name = Worksheets(“sheet_name”).Cells(X, Y).Value
Clear the clipboard:
Application.CutCopyMode = False
Select all cells that currently have data from a starting point “F1”:
Range(“F1”).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
You must be logged in to post a comment.