need assistance to mod the formula and code to summing values from sheet

  • hello


    guys I'm in a big trouble and I no know how can I fix it the problem I highlighted by red color in c3 and e6 when I clear b1,2,3 it brings all data but it ignore the values in sheet1 so what I want summing all values from sheet1 and put in cells I highlighted red but without effect when I select in b1,b2,b3 also

    it brings the value from sheet1 , actually I no know how mod the formula and code


    I truly appreciate if any body solve it

  • Hello,


    Your question is not very clear ...


    Is it the same formula and the same formula you need in cell C3 and E6 ?


    Code
     =INDEX(Sheet1!$C:$C,MATCH(B1,Sheet1!$B:$B,0))

    Hope this will help

    :)

    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 :)

  • hi Carim

    about c3 there is existed a formula I need it when I select the name in b1 then brings the balance from sheet1 and e6 the same balance what is in c3 also it brings from sheet1 but by code you can check my code

    but the problem the formula and code don't work when b1 is clear it brings all of data with ignore total all of balances from sheet1 because the formula and code design for select name in cells b1

    so I would way dynamically to do that two ways together (when select name from b1 or b1,2,3="")

  • Hi,


    Do you mean just a test for the cell B1 not to be empty ...

    Code
    =IF(B1="","",INDEX(Sheet1!$C:$C,MATCH(B1,Sheet1!$B:$B,0)))

    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 :)

  • also should bring the values when b1is empty


    OK ... but which value ...???

    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 :)

  • the values in sheet 1 should summing in all 100+12+150+1234+8+8000=9504

    should be in c3 but the e6 is not formula it runs by the code otherwise it will crash the code and shows error values

  • So you can test following formula


    Code
    =IF(B1="",SUM(Sheet1!C:C),INDEX(Sheet1!$C:$C,MATCH(B1,Sheet1!$B:$B,0)))


    Hope this will help

    :)

    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 this could help you :)


    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!