Search:

Type: Posts; User: Greg Truby; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.31 seconds.

  1. Re: Line graph with different colours depending on criteria

    Jon's got tons of stuff on this kinda thing.

    This should get you started:

    https://peltiertech.com/conditional-formatting-of-excel-charts/

    Scroll down a bit to get to the section using line...
  2. Replies
    23
    Views
    703

    Re: Help with loop VBA

    This is working for me in testing. You'll need to tweak it for your own peculiarities, but you should be able to follow along. By nature I just automatically code in safeguards (been doing this too...
  3. Replies
    11
    Views
    860

    Re: Extract Date from text

    :cry: Jeepers, I was kinda 'xpectin' ol' Rick ta say sumpin' 'bout the title of my message box -- but nuttin'. :cry:
  4. Replies
    11
    Views
    860

    Re: Extract Date from text

    Rick already solved this for you. Just translate what he gave you to VBA:

    Sub Foo()

    Dim dtmDate As Date, _
    strDate$

    Let strDate = Sheet1.Range("A1").Text
    Let...
  5. Replies
    12
    Views
    580

    Re: accessing variant after macro has ended

    I would not have thought of that. Thanks, JKP!



    (a) We've set a watch on IsArray(v) (context set to all procedure in all modules) and a breakpoint on the IF and stepped code and we're sure...
  6. Replies
    12
    Views
    580

    Re: accessing variant after macro has ended

    Public or private variables should be persisting... for example these persist, each in their own modules, even though the names are the same:
    '// Code in Sheet1's worksheet module

    Private...
  7. Replies
    12
    Views
    580

    Re: accessing variant after macro has ended

    Are you needing the variable's value to persist between workbook sessions? I.e. if the user closes the workbook and re-opens it, the variable still has the value it had when the user closed the...
  8. Re: How can I take info from a cell and change it's format for a different cell?

    Sweet formula! I might tweak it slightly to handle measurements over 23'11"...

    =TEXT(SUBSTITUTE(A1,CHAR(39),":"),"[hh]mm")


    @ WorkingHere - as far as the CHAR(39) bit goes, 39 is the ASCII...
  9. Re: How can I take info from a cell and change it's format for a different cell?

    To Joe's point, if the apostrophe is actually typed into the cell then:

    =TEXT(LEFT(A1,FIND(CHAR(39),A1)-1),"00")&TEXT(RIGHT(A1,LEN(A1)-FIND(CHAR(39),A1)),"00")

    If the apostrophe is due to some...
  10. Replies
    6
    Views
    222

    Re: Add TExt to a Cell With a Number

    In your initial post you're scanning for cells in G that are not blank, this make me think you might have cells in G that ARE blank where you don't want the "ABCD" entered into the cell. If that's...
  11. Re: Cells losing alignment when plugging laptop into projector

    Indeed - I would see if this replicates with another workbook.

    If not, then are you sure you're using the same file? After resetting the cells' alignment to left yet again, I would change the...
  12. Replies
    6
    Views
    255

    Re: Auto Click Userforms

    I, too, would advise trying to get ahold of the code behind the OK button. That's definitely the more robust option.

    But if that's just not possible, then search here for threads on the subject...
  13. Replies
    13
    Views
    670

    Re: VBA remove all duplicate rows

    I'm heading to bed. But if'n ya wanna copy uniques to another sheet, have a look at advanced filter.
  14. Replies
    13
    Views
    670

    Re: VBA remove all duplicate rows

    Are you going to be doing this time-after-time-after-time, so you need a macro? Or is this just a once-in-a-while thing? If so, I'd just do it manually using the button on the DATA tab.
  15. Replies
    13
    Views
    670

    Re: VBA remove all duplicate rows

    Please note the following bit in Logit's pose (I didn't test it, but I suspect the array argument may need to be different).



    Option Explicit


    Sub DeleteRows()
    Dim Rng As Range
    With...
  16. Re: VBA for Concatenating Cells in a Specified order found in a list

    Well, it's a quarter 'til five on Friday, so margarita time will be here soon. :-D


    I quite missed that your sequence was based on the cities, I just thought you were wanting to list the items...
  17. Re: VBA for Concatenating Cells in a Specified order found in a list

    :confused: Either you've had a bit too much rum punch, sir, or else I ain't had quite enough... :stickouttounge: To me the results look exactly like the results you were requesting. :confused:
  18. Replies
    8
    Views
    262

    Re: VBA Declaring a workbook

    Edit -- Fluff's on the right track... Paste ain't a RANGE method. It's a worksheet method.
  19. Replies
    8
    Views
    262

    Re: VBA Declaring a workbook

    The best way to avoid getting entangled in this kinda briar is to simply create a common function to generate the filename consistently, i.e.



    Function fnGenerateSecRentFilename(ByVal...
  20. Re: VBA for Concatenating Cells in a Specified order found in a list

    Function RevConcatCells(ConcatArea As Range) As String

    Const c_strSep As String = ", "

    Let v = ConcatArea

    For i = UBound(v, 1) To LBound(v, 1) Step -1
    For j =...
  21. Re: apply same formula for a set of two consecutive rows

    Rather than just tell you (giving you a fish). I'm going to tell you how to figure it out for yourself (teach you how to fish).

    First of all, on the Formulas tab there is an Evaluate Formula...
  22. Replies
    19
    Views
    376

    Re: Enable/Disable Macro Button

    It only matters if you use the code I posted. Note that the code is tied to the _Calculate event handler for the Worksheet that has the button and that the call to the .Range method is prefixed by...
  23. Replies
    19
    Views
    376

    Re: Enable/Disable Macro Button

    The following assumes: (a) the button is an ActiveX button and not a forms button and (b) your named range "ValidData" is scoped to the workbook level and not scoped to the Calculations worksheet.
    ...
  24. Re: apply same formula for a set of two consecutive rows

    INDIRECT() and MROUND() are NOT "code" in the sense that they have nothing to do with VBA. They're just regular old Excel functions. What I gave you was the function to drop into the cell (D7?)...
  25. Re: apply same formula for a set of two consecutive rows

    =CONCATENATE("CUSTOMER TRAVELLED FROM ",INDIRECT("C" & MROUND(ROW(),2)-1)," TO ",INDIRECT("C" & MROUND(ROW(),2))," ON ",TEXT($C$4,"dd-mm-yyyy"))
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4