Forum Discussion

Rashhour123's avatar
Rashhour123
Copper Contributor
Oct 12, 2022

How to write a formula that can use data from multiple sheets?

I need a formula that goes something like this: If cell B2 on worksheet3 is "Name of worksheet1" then use cell K2 from worksheet1 to subtract cell J2 from worksheet3. But if cell B2 on worksheet3 is "Name of worksheet2" then use cell I2 from worksheet2 to subtract cell J2 from worksheet3

  • Rashhour123 

    =IF(B3="worksheet1",worksheet3!J2-worksheet1!K2,IF(B3="worksheet2",worksheet3!J2-worksheet2!I2,""))

    You can try a nested IF formula.

     

Resources