Forum Discussion
Using the IF function
Hi, AlarmSpecialist
I am not sure I understand your question, but if you want add C2 to C1 in the other Cell, You can use this Formula:
=IF(Sheet2!C3="A",C1+C2,"")
- AlarmSpecialistJan 07, 2023Copper ContributorPage 1 - I want it to equal the totals from page 2.
Page 2 - I want to enter dollar amounts in one cell, then a code (A, B, C) in another cell.
Then, I want to add all the "A" codes on page 2 to one cell on page 1 as the total of all "A" amounts.- mathetesJan 07, 2023Silver Contributor
Since you are learning Excel, you might want to become familiar with sites such as the one linked here (specifically in this case to the SUMIF function). You can learn a lot about functions and how they work here. YouTube also has many effective instructional videos, from quite basic to quite advanced.
- AlarmSpecialistJan 07, 2023Copper ContributorThank you. You were able to help me quite a bit. Yes, I am VERY new to using formulas and am unaware of the numerous functions available.
- mathetesJan 07, 2023Silver Contributor
Your second description describes circumstances that (potentially) go quite a bit beyond your first, to the point that it might well not be a situation calling for use of IF, but something a bit more powerful/sophisticated.
It sounds as if it could be a check register or some other list of financial/monetary transactions that are on your Sheet 2, and a summary on Page 1. As such, and this is often true in Excel, there are probably several ways to do it, which one of which is most appropriate could depend on which version of Excel you are using.
For example, using to the extent I could your description to build this, see the attached sheet. There are two different formulas used on Sheet 1 to calculate the totals of numbers from Sheet 2 based on code A, B, or C. I display the formulas was well as the results. You can change the value in cell C1 on Sheet 1 to see how different codes produce different results.
(The second formula uses the FILTER function and will only work if you have a recent version of Excel; the other, using SUMIF, will work with older versions.)