Find & Replace Sub

  • Hey everyone,

    I wrote this sub this morning to set a new Min / Max Value based off the Users Range they Input in a couple of cells to update the formula

    A lot of trial and error got me a functioning sub, I also wanted to update the formula on a different sheet "Daily Input" the code seems to process but nothing changes on the Daily Input sheet, just the status board.

    Now that I'm typing this I'm wondering if its because the code was written into the sheet and not a module?

    Other then that issue, I'd like some feedback on suggestions or improvements to the code, I'd say I'm in the beginning stages of learning how to use VBA so all feedback is welcomed!

    I thought about creating a userform to display the information or get the new range inputs using a msgbox

    The Code is looking at the Min-Max Values in G and F
    and replacing those values in the formula below


    I tried this code, and it was returning the correct Row without the need to adjust the ranges, but the Index was not returning the correct value when using this Code. Even though both the sumporducts returned the same Row Number, and the same index formula would return different results.


    was returning incorrect data when using the Indirect version.

    =INDEX(Data!$I:$I,'Status Board'!D5)

    Thank you!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!