Multiplying from list, at changing rates

  • Hello


    I am having a problem with my coding and could greatly use some assistance.


    I am attempting to create code to search through one column of multiple numbers up to a certain value and then multiply these numbers by the values in the column next to the first column.


    In the attached document i am looking for a solution that would take the 'designated amount' value in H6 and then search through the 'Amount' column in the table until the value of H6 has been reached. Then the values in 'Amount' column need to be multiplied by the value in the 'Value' column of the table.

    Ideally, the solution would work in a way that if the 'designated amount' in H6 doesn't completely engulf one of the values in the 'Amount' column then it would take as many as needed to reach the value in H6 but no more.


    Many thanks

  • Hello,


    Why don't you take advantage of your test file ... to include ... not only the starting point ... but your expected result ...


    This would help clarify your process ...;)

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • No problem ...


    Whenever you are modifying your " designated amount " in cell E2 ... do you get the correct "expected amount " in cell G2 ...?

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • Glad to hear you could solve your problem:)


    Thanks for your Thanks ...AND for the Like :thumbup:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

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