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,"")
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, 2023Gold 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, 2023Gold Contributor
Yes, I am VERY new to using formulas and am unaware of the numerous functions available.
There's a rule of thumb I've often used, first with myself, then with others as they get into Excel. "If you think to yourself 'Excel ought to be able to do thus and so ______' then the chances are extremely high that it CAN do thus and so. The challenge then is to find how the minds behind Excel chose to program that function or that capability, and then figure out how they might have named it."
Here, for example, is a list of several hundred Excel functions, categorized according to a taxonomy of different categories of the types of data or disciplines they deal with. It's well worth going over that if only to familiarize yourself with the range of possibilities.
- mathetesJan 07, 2023Gold 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.)