Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How can I shorten this formula for "IF" function in Numbers

I'm trying to create a budget table and separated on the side, calculate all the Groceries expenses. Only problem is that i have all sorts of other expenses in the same column and I will like to calculate only the amounts that correspond with the Groceries row.

Is there a simple formula or can i simplify this one?

Many thanks.


=IF(Table 2::G1="Groceries",Table 2::E1,0)+IF(Table 2::G2="Groceries",Table 2::E2,0)+IF(Table 2::G3="Groceries",Table 2::E3,0)+

IF(Table 2::G4="Groceries",Table 2::E4,0)+IF(Table 2::G5="Groceries",Table 2::E5,0)+IF(Table 2::G6="Groceries",Table 2::E6,0)+

IF(Table 2::G7="Groceries",Table 2::E7,0)+IF(Table 2::G8="Groceries",Table 2::E8,0)+IF(Table 2::G9="Groceries",Table 2::E9,0)+IF(Table 2::G10="Groceries",Table 2::E10,0)+IF(Table 2::G11="Groceries",Table 2::E11,0)+IF(Table 2::G12="Groceries",Table 2::E12,0)+IF(Table 2::G13="Groceries",Table 2::E13,0)+IF(Table 2::G14="Groceries",Table 2::E14,0)+IF(Table 2::G15="Groceries",Table 2::E15,0)+IF(Table 2::G16="Groceries",Table 2::E16,0)+IF(Table 2::G17="Groceries",Table 2::E17,0)+IF(Table 2::G18="Groceries",Table 2::E18,0)+IF(Table 2::G19="Groceries",Table 2::E19,0)+IF(Table 2::G20="Groceries",Table 2::E20,0)+IF(Table 2::G21="Groceries",Table 2::E21,0)+IF(Table 2::G22="Groceries",Table 2::E22,0)+IF(Table 2::G23="Groceries",Table 2::E23,0)+IF(Table 2::G24="Groceries",Table 2::E24,0)+IF(Table 2::G25="Groceries",Table 2::E25,0)+IF(Table 2::G26="Groceries",Table 2::E26,0)+IF(Table 2::G27="Groceries",Table 2::E27,0)+IF(Table 2::G28="Groceries",Table 2::E28,0)+IF(Table 2::G29="Groceries",Table 2::E29,0)+IF(Table 2::G30="Groceries",Table 2::E30,0)+IF(Table 2::G31="Groceries",Table 2::E31,0)+IF(Table 2::G32="Groceries",Table 2::E32,0)+IF(Table 2::G33="Groceries",Table 2::E33,0)+IF(Table 2::G34="Groceries",Table 2::E34,0)+IF(Table 2::G35="Groceries",Table 2::E35,0)+IF(Table 2::G36="Groceries",Table 2::E36,0)+IF(Table 2::G37="Groceries",Table 2::E37,0)+IF(Table 2::G38="Groceries",Table 2::E38,0)+IF(Table 2::G39="Groceries",Table 2::E39,0)+IF(Table 2::G40="Groceries",Table 2::E40,0)

MacBook Pro, OS X Yosemite (10.10.5), Numbers version 3.5.3

Posted on Oct 12, 2015 2:18 PM

Reply
Question marked as Best reply

Posted on Oct 12, 2015 8:46 PM

try

sumif(G, "Groceries", E)


this sums values in column E only if the value is the same row of column G is "Groceries"

4 replies

How can I shorten this formula for "IF" function in Numbers

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.