Find first negative value in column based on value in another column

  • Hello,


    I have an issue that i have been searching for hours on the net for an cannot resolve.


    What I need to solve is the following:


    I have repeating values in column 1 which is the item number...Then in another column I have a running balance that corresponds to that item in column H and column I...I need to find the first negative value in column H and column I for that item and return the date in column B


    I have attached a sample worksheet and highlighted the values in red and yellow that are relevant for each item, and have included a before and after as well. I hope someone can help me out.


    thanks.

  • Re: Find first negative value in column based on value in another column


    Jindon,


    this is super...i didn't realize this would be a vba solution...how would i edit this if i wanted this output on a new sheet and every time i click update, it would delete the old and replace with new?


    Thank you in advance for your time!

  • Re: Find first negative value in column based on value in another column


    Jindon,


    I replaced :

    Code
    With .Offset(.Rows.Count + 2)


    with:


    Code
    With Sheets("sheet2").Cells(1, 1)


    and it seems to work perfect! thank you again...

  • Re: Find first negative value in column based on value in another column


Participate now!

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