Search:

Type: Posts; User: Rick Rothstein; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.89 seconds.

  1. Replies
    3
    Views
    31

    Re: Fill blanks macro

    Untested, but this macro should work...

    Sub donniedorian2()
    Selection.Replace 0, 1, xlWhole, , , , False, False
    On Error GoTo NoBlanks
    Selection.SpecialCells(xlBlanks) = 1
    NoBlanks:
    End...
  2. Re: Check if a cell contains same digits

    If you are always checking only cell A1 and no other, you can use this somewhat compact code line to do your latest check...

    MsgBox...
  3. Re: Check if a cell contains same digits

    Does a number like 5555 where all the digits are the same qualify as being True under this request?
  4. Re: Check if a cell contains same digits

    @Phouc,

    :bow: These are both excellent and elegant solutions to the OP's first two questions! Great incite into the underlying mathematical structure of the problem!
  5. Re: VBA to Remove all rows in Table that contains a speified text string

    This may not work because of the huge number of implied rows in your Table, but give it a try anyway and let us know how it did...

    Sub DeleteRowsWithVoc()
    With...
  6. Re: VBA - Maybe Looping - Activate Multiple Sheets?

    You can eliminate the 'mon' variable and set the 'sh' variable directly by replacing the two highlighted lines of code with this single code line...

    Set sh = Sheets(MonthName(i, True))
  7. Re: Remove leading spaces from text pasted in Texform of Userform

    Will the text on each line alway contain single words? If so, that should work. If not, then maybe this which should cover all reasonable possibilities...



    TextBox1.Value =...
  8. Re: Remove leading spaces from text pasted in Texform of Userform

    I think maybe your "spaces" (ASCII 32) are actually "non-breaking spaces" (ASCII 160) which usually comes from copying text from the web (although there are other sources for it). Instead of this......
  9. Re: VBA Excel: Clear the entire col expect A1

    What about this single line of code...

    Intersect(Range("2:" & Rows.Count), Range("A:A, C:E, I:K")).ClearContents

    You can add worksheet and workbook references if you do not always want the...
  10. Replies
    7
    Views
    156

    Re: using variables from other macro

    Two notes about Eric's suggestion...

    1) I would suggest using complex variable names that cannot easily be called accidentally from within some other unintended procedure.

    2) You cannot Dim...
  11. Re: Custom List for Sort Order - Using Sorted Values w/ Commas

    That is almost always a bad idea as the best that can happen is you get a great answer to a problem you do not really have nor actually care about. This almost always means you will come back and...
  12. Re: Removing everything outside brackets in a cell

    One of the ways Excel can display negative numbers is when the number is enclosed in parentheses, so I used the REPLACE function to create that text string... if a numerical text string is involved...
  13. Re: Removing everything outside brackets in a cell

    For those interested, here is a simple formula solution...

    =-REPLACE(C1,1,FIND("(",C1)-1,"")
  14. Replies
    8
    Views
    146

    Re: Trouble Using Formulas in VBA

    The Excel function is spelled DateDif (only one "f" at the end)... I didn't really parse your code in full, but if you make that change in your code, I think it should work. Just so you know, VBA has...
  15. Replies
    18
    Views
    15,414

    Re: VBA for visible range

    I didn't look at your file... do you have the screen split into 4 panes? If you only have it split into two panes, then change the 3's to 2's...

    TopLeftCellInPane2 =...
  16. Replies
    18
    Views
    15,414

    Re: VBA for visible range

    You don't need all that code I posted for what you are asking above. This single line of code with return the address for the top left cell in Pane 3...

    TopLeftCellInPane3 =...
  17. Re: Splitting out title, first name, middle name, last name

    While your UDF does not address what Fluff, kweaver and myself pointed out, I do note that your UDF can be simplified to this...

    Function Salim_Split_Name(N_name, N)
    On Error GoTo BadN
    ...
  18. Re: Splitting out title, first name, middle name, last name

    Or his wife...

    Mary Ann van der Westhuizen

    where Mary Ann is the full, legal first name (I worked with someone with that first name). The point here is you cannot assume all first and last...
  19. Replies
    18
    Views
    15,414

    Re: VBA for visible range

    This code produces a slightly different result than Tom's code (either originally or if expanded for split screens). Tom's code only counted a row or column if it was fully visible within its pane...
  20. Re: Parse email address from long strong

    Actually, in thinking about it, the above macro can be done with just a single line of code...

    Sub SplitEmails()
    [A2].Resize(UBound(Split([A1], "@"))) =...
  21. Re: Parse email address from long strong

    Here is another approach you can consider (text assumed to be in cell A1, output starts at cell A2)...

    Sub SplitEmails()
    Dim X As Long, Emails As Variant
    Emails =...
  22. Replies
    7
    Views
    152

    Re: Converting date and hours format

    Here is another formula that should work...

    =TEXT(LEFT(A1,SEARCH("d",A1)-1)+TEXT(MID(A1,FIND(" ",A1)+1,8),"h:mm:ss"),"[h]:mm:ss")
  23. Re: VBA: right of a character and include that character

    The Mid function (in VBA) is even easier to use for the OP's request... you can leave off what I highlighted in red and it will still work the same... the Mid function returns out to the end of the...
  24. Replies
    9
    Views
    191

    Re: Populate cells with array

    You cannot have a blank or zero in the Resize property... either put a 1 after the comma or omit the comma (doing that will make the columns argument the default of 1). Of course, after you fix that,...
  25. Re: VBA - Delete rows that DO NOT contain Bold font

    Silly mistake by me.:oops: Since we are deleting rows, the rows must be iterated from bottom to top... otherwise one of two adjacent rows to be deleted will be skipped when the first is deleted and...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4