Search:

Type: Posts; User: wrecclesham; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.00 seconds.

  1. Re: Displayed date difference starts counting from one day again whenever a date difference exceeds one month

    joeu2004

    That works perfectly!!

    I was actually wondering if I could somehow customize the plurals but thought it might be too difficult.

    I've adapted it slightly. Originally, I used a hidden...
  2. Re: Displayed date difference starts counting from one day again whenever a date difference exceeds one month

    Thanks! I'll give that a try.

    If anyone can figure out a way to do this and return the result as a value, that would be awesome.
  3. Re: Displayed date difference starts counting from one day again whenever a date difference exceeds one month

    This is probably a simple issue but I can't quite figure it out!
  4. Displayed date difference starts counting from one day again whenever a date difference exceeds one month

    I'm trying to calculate the date/time difference between two cells, to be displayed in days, hours and minutes.

    Right now, if I simply use

    <code><code>=A1-B1</code></code>

    The cell...
  5. Replies
    3
    Views
    109

    Re: Conditional formatting using VBA

    Thanks a lot for that code!

    I'm trying to avoid using the macro recorder in this particular case as I want to have clean code that I can use to learn from in the future.
  6. Replies
    3
    Views
    109

    Conditional formatting using VBA

    Could someone please help me to create a VBA script which applies the following three conditional formatting rules?

    https://i.imgur.com/S5Gwoqj.png

    Rule 1

    https://i.imgur.com/q8L8f2A.png
    ...
  7. Re: Protect worksheet without stopping a macro from running?

    Does anyone have any ideas?
  8. Re: Protect worksheet without stopping a macro from running?

    I've allowed everything.
  9. Protect worksheet without stopping a macro from running?

    I have a worksheet that I wish to enable protection on.

    Unfortunately, whenever the worksheet is in a protected state and I update any values in any unlocked cells which the macro automatically...
  10. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    As usual, your code works perfectly!

    Thanks again, Fluff!
    :beerchug:
  11. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Hi Fluff,

    Sorry to bother you with this old question again. :)

    I actually got stuck right with the last step and wasn't quite able to incorporate the new code snippet into my existing VBA.
    ...
  12. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Works perfectly! Thank you.

    I'm trying to insert your code into my existing macro so that it continues to automatically sort the data whenever there are any changes, just using the improved logic....
  13. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    That fixed it!

    There was a merged cell in another row, outside of A2:D11. Targeting only these rows prevents any errors appearing at run time.

    The dates and text strings are being sorted...
  14. Uploaded screeenshots appear massive, even to me!

    I sometimes take screenshots on my 4K monitor and upload them to Imgur so I can embed them.

    Any ideas why they come out so large? It's not a problem on mrexcel.com.

    Even when I view them on...
  15. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Just tried using that code. Getting a run-time error 1004. Hmm.

    Feels like this is nearly solved! Just need to figure out why I'm getting a run-time error on my end and to restrict the sorting to...
  16. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    I tried using this:


    Sub MG01Aug13()
    Dim Rng As Range, Dn As Range, nRng As Range
    Set Rng = Range(Range("A2"), Range("A" & Rows.Count).End(xlUp)).Resize(, 4)
    Rng.Sort Range("D2")
    For Each Dn...
  17. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    MickG



    I'm having some trouble getting your VBA to work for me but it looks promising.

    Does it just need an "End Sub" after it?

    What about before? Sorry for the basic questions, I'm new...
  18. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Fluff

    The reason I favour the VBA approach is that I would like it to dynamically sort whenever any values are updated in the worksheet.

    If I use a helper column and (manually?) sort on that, I...
  19. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Here is a screenshot showing exactly what I'm trying to accomplish, including the real cell ranges in question.

    https://i.imgur.com/ZJqvPnz.png

    1) Rows A2:D11 should be arranged in ascending...
  20. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Also, how can I add your code to my existing code so that it automatically runs whenever any values are changed in the worksheet?
  21. Replies
    23
    Views
    686

    Re: VBA code to sort text BEFORE numbers?

    Hi Richard,

    I'm trying to adapt your code to sort by the values in D2:D11.

    Range of rows to sort: A2:D11.

    Does this look okay?


    Option Explicit
  22. Re: =OR function always returns "FALSE"

    The IFERROR function works great.

    There was a mistake in my previous comment where I said that there was only a problem in the entire OR function.

    As I think you already noticed, a "#VALUE!"...
  23. Re: =OR function always returns "FALSE"

    I tried using the following formula but it continually returns a "FALSE" result, for either of the two conditions.


    =OR(TODAY()-D2:D11>=120,ISTEXT(D2:D11))

    However, if I try using the same two...
  24. Conditional formatting rule for any text string being present

    I use the following conditional formatting rule to highlight any dates older than 120 days:

    =TODAY()-D2:D11>=120

    <a href="https://imgur.com/FaPdt6P"><img src="https://i.imgur.com/FaPdt6P.png"...
  25. Replies
    23
    Views
    686

    VBA code to sort text BEFORE numbers?

    I use the following VBA code to sort a list of dates in ascending order.


    Range("A1:B10").Sort Key1:=Range("A1"), _
    Order1:=xlAscending, Header:=xlNo, _
    OrderCustom:=1,...
Results 1 to 25 of 42
Page 1 of 2 1 2