Results 1 to 4 of 4

How to modify the macro to work regardless of the row number?

Threaded View

  1. #1
    Registered User
    Join Date
    03-12-2024
    Location
    Bulgaria
    MS-Off Ver
    Microsoft 365
    Posts
    5

    Question How to modify the macro to work regardless of the row number?

    Hey, everyone,

    This is my macro and as you can see it works for the first 782 rows. How can I modify it to work regardless of the row number?

    Sub HourlyBugged()
    '
    ' HourlyBugged Macro
    '
    ' Keyboard Shortcut: Ctrl+Shift+U
    '
        Range("B4").Select
        Selection.End(xlUp).Select
        Selection.End(xlToLeft).Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
            TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
            Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
            :=Array(Array(1, 1), Array(2, 2), Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 3), _
            Array(7, 3), Array(8, 1), Array(9, 1), Array(10, 1), Array(11, 1), Array(12, 1), Array(13, 1 _
            ), Array(14, 1), Array(15, 1), Array(16, 1), Array(17, 1), Array(18, 1), Array(19, 1), Array _
            (20, 1), Array(21, 1), Array(22, 1), Array(23, 1), Array(24, 1), Array(25, 1), Array(26, 1), _
            Array(27, 1), Array(28, 1), Array(29, 1), Array(30, 1), Array(31, 1), Array(32, 1), Array( _
            33, 1), Array(34, 1), Array(35, 1), Array(36, 1), Array(37, 1), Array(38, 1), Array(39, 1), _
            Array(40, 1), Array(41, 1), Array(42, 1), Array(43, 1), Array(44, 1), Array(45, 1), Array( _
            46, 1), Array(47, 1)), TrailingMinusNumbers:=True
        Range("F7").Select
        Application.CutCopyMode = False
        ActiveSheet.ListObjects.Add(xlSrcRange, Range("$A$1:$AU$782"), , xlYes).Name = _
            "Table3"
        Range("Table3[#All]").Select
        Columns("F:F").EntireColumn.AutoFit
        Columns("G:G").EntireColumn.AutoFit
        Columns("B:B").EntireColumn.AutoFit
        Range("E9").Select
    End Sub
    Last edited by ivaylos89; 03-12-2024 at 12:06 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Modify Order Number Column based on Zip Code Column
    By gshowman1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-20-2020, 01:23 PM
  2. [SOLVED] Need someone to edit Modify Macro's to work on entire work book
    By MarkKil in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-24-2018, 01:01 AM
  3. Modify Macro to work anywhere on wooksheet not just in specific cells
    By Daddy007 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2016, 08:10 PM
  4. [SOLVED] Modify This Macro To Generate More Than 1048576 Number Sets
    By ssjagger in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-07-2015, 04:16 PM
  5. Modify macro to work with larger data.
    By wonderd in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 09-05-2014, 04:51 AM
  6. [SOLVED] Help to modify Macro - delete rows that DO NOT contain a negative number.
    By chicalaeti in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2013, 05:51 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1