Posts by yegarboy

    Greetings friends.

    Not sure why but my code will not continuously add data to the Last Row in a Column. It simply loops through all the data pasting only the final result.


    It should have pasted 200 values to the bottom of my list. But it just changes the value of the Last row to the value of the 200th result.

    Here is my code. I can;t see whats wrong.

    Re: Changing text color based on information in the cell

    If I understand your need correctly then Conditional Formatting will work for you. Follow these steps to set it up.

    1. Highlight the range of cells to receive the Formatting.
    2. Click Conditional Formatting from the Excel Ribbon "Home Tab"
    3. Select the "Highlight Cells Rule" option then select "Between" from the sub menu.
    4. Change the Between settings to 1% and 70% then select "Custom" from the drop down menu.
    5. Under the Font tab select BOLD
    6. Under the Fill Tab select RED as your Fill Color.

    Click OK and your all set.

    I hope this helps.

    Re: VBA Highlight Highest & Second Highest Value In Each Column

    This should work, I changed your sheet names for testing purposes.

    Hello Ladies and Gents,

    What I am trying to do is make this Formula Dynamic. It is part of a much larger scenario but here is the gist. I can make it work for smaller Formulas but this one is throwing an Application Defined Error 1004

    I would like this formula inserted to a cell through VBA Dynamically.

    =IF(BA10<=0, 2, IF(BA10<>"", BA10, (MAX(AZ10,AY10))))

    This is what I am currently working at..

    Target.Formula = "=IF(BA" & Target.Row & "<=0" & "," & "" & "," & "If(BA" & Target.Row & "<>""" & "," & "BA" & Target.Row & "," & "(MAX(CA" & Target.Row & "," & "DA" & Target.Row & "))))"

    I have made it work previously but can not seem to get the syntax right. Any help would be great. Thanks so much

    P.S Formulas are not my strong point :)

    Re: Find a text string in a column and perform action if true

    Re: Offset and Match together in VBA

    Do you mean to add a formula using VBA?

    Like this?

    Sub InsertFormula()
    ActiveCell.FormulaR1C1 = "=Offset(FullName, Match(HHSelect, PolicyHolderID, 0) - 1, 0, 1, 1)"
    End Sub