Posts by graha_karya

    Should be

    Code
    1. Sub MisRec() Dim ws As Worksheet For Each ws In Worksheets ws.activate Cells.Find(What:="abc", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate ActiveCell.Offset(-2, 0).Select Range(ActiveCell, "A2").Select Selection.EntireRow.Delete Next ws End Sub

    perhab for dinamic range wrap text like this

    Code
    1. Sub xxz()
    2. For Each r In [B]Range("C:C").SpecialCells(2) 'change with first column Autofit[/B]
    3. If r.MergeCells = True Then
    4. If U Is Nothing Then Set U = r.Cells(1) Else Set U = Union(U, r.Cells(1))
    5. End If
    6. Next r
    7. If not u is nothing then U.name ="Deskription" end sub

    Finaly if you want dinamic range merge cell to autofit

    t

    graha_karya,


    Thanks for your reply. Is there a way to use a named range instead of listing every cell?


    try this

    For quickly try this if your merge area struktur as same as example in col c,d and e
    example you have merge in c1:e1
    Step 1 : you must know columnwidth in col c,d,e by clik in format columnwidth
    For example total column width = 25
    Step 2 = in z1 = +c1
    Step 3 wrap text in z1 and clik autofit row
    You can record then


    i dont understand you want
    in post #7 i has edit my code
    C23=test("GSA-",sheet2,E16:E416)
    C13=test("GSA-",sheet2E520:E920)
    C33=test("GSA-",sheet2,E1100:E1500)
    [ATTACH=JSON]{"data-align":"none","data-size":"full","title":"cxx.png","data-attachmentid":1219785}[/ATTACH]

    1 minute ago
    My only problem is that there are 20 of these formulas on one sheet which pull numbers from different ranges. So I would have to type in the letters to 20 different formulas each time. Is there a way to do this that isn't a UDF and it would automatically put the numbers in numerical order regardless of which letters there are?


    if you has any or multi range using parramArray

    Code
    1. Function test(Textreplace As String, fx As Variant) As String
    2. change to
    3. [B]Function test1(Textreplace As String, ParamArray fx() As Variant) As String[/B]
    4. but you must edit little code you can do in cell with multi range and multi sheet
    5. [B]= test1("A",shee1A1:a10,sheet2b10:b30,{"F90";"F90";"F90A"})

    [/B]
    [/code]

    if any range or 1 range edit code

    finaly you can make UDF like this
    only small editing in B1=test(A1;"ARD-") change red text with your text

    this is answer for case in link : https://www.ozgrid.com/forum/f…umbers-in-numerical-order


    [ATTACH=JSON]{"data-align":"none","data-size":"full","title":"ssx.png","data-attachmentid":1219768}[/ATTACH]