Monday, 12 July 2021

Useful Macros

 Jump

Sub JumpTo()

'Description: Select the specified row or column

  'If row is specified, active column is used

  'If column is specified, active row is used

Dim sResult As String

  On Error Resume Next 'Blanket error handling  

  'Display inputbox to prompt user for row/column

  sResult = InputBox("Type a row number or column letter and press Enter.", "Jump To...")  

  If IsNumeric(sResult) Then 'Select row

    Cells(sResult, ActiveCell.Column).Select

  Else 'Select column

    Cells(ActiveCell.Row, sResult).Select

  End If

End Sub


Delimited by Pipe Operator

Sub Separator()

Columns("A:A").Select

    Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _

        TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _

        Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _

        :="|", FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1)), _

        TrailingMinusNumbers:=True

End Sub



No comments:

Post a Comment

 Hypervision Off through Cmd Open Cmd as Administrator Run this command :  bcdedit /set hypervisorlaunchtype off