Posts by MickG

    Re: Merging Cells with common string Values using VBA


    Try this for your 3 columns:-
    NB:- This Code will alter the formatting of those columns !!!!

    Re: Macro is SUM = 0 delete relevant rows


    Based on the File format shown in this thread "Datafile.xls" + your data You could try this.

    Re: Convert table that will vary in length to 16x24 arrays in new sheets


    Try this:-

    Re: Convert table that will vary in length to 16x24 arrays in new sheets


    Try this:-

    Re: Convert table that will vary in length to 16x24 arrays in new sheets


    Try this:-

    Re: Macro is SUM = 0 delete relevant rows


    If you don't mind changing the "formulas" to "Values" then you can place the bit of code at the top of the existing code as shown.

    Code
    Sub Del()
    Dim Rng As Range, Dn As Range, nRng As Range
      
    'New bit of code:-
    With Range("U:U")
      .Value = .Value
    End With

    Re: Macro is SUM = 0 delete relevant rows


    Try this:-
    This code should now also remove the "Sum= 0" function line and the blank row beneath it.

    Re: Macro is SUM = 0 delete relevant rows


    Try this:-
    I assumed you actual data starts "T2".

    Re: Concatenate data above the blank cell in same column


    Try this:-
    See code Note !!!!

    Re: Goalseek calculates annual payment needed to reach target


    This May Help:-
    This equation is evaluated from a geometric series:-
    Example 3yrs @ 10% Investing £100/yr
    Eqn(1) Sum3yrs = 100(1.1^3 + 1.1^2 + 1.1)


    In order to reduce this equation down you need to Multiply this equation by the common Ration, 1.1 to obtain equation below:-
    Eqn(2) Sum3yrs*1.1 = 100(1.1^4 +1.1^3 +1.1^2 )


    You then need to take Eqn(1) from Eqn(2) (first cancelling out the common values).
    This leaves:-
    Sum3yrs(1.1-1) = 100(1.1^4 ) -100 (1.1) (This is where the extra 1 comes from)


    This evaluates to:-
    Sum3yrs = 100(1.1^4 -1.1)/(1.1 - 0.1) . In your eqation we're looking for the value 100, so transposing we get:-
    NB:- Know the sum = 364.1 from this Equation and transposing back to get the 100 :-


    364.1* 0.1/(1.1^4 -1.1) = 100 For this Example


    and for Your Equation
    1000000 *0.1 / 1.1 ^(40+1) - 1.1) = 2054.013

    Re: Store array items


    Perhaps this:-

    Code
    Set R = Sheets("Sheet1").Range("H1").Resize(UBound(Arr) - LBound(Arr) + 1, 1)
        R = Application.Transpose(Arr)
        R.Sort key1:=R, order1:=xlAscending, MatchCase:=False
        With Range("E1").Validation
            .Delete
            .Add Type:=xlValidateList, Formula1:="=" & R.Address & ""
        End With