sumif with the criterion of what to sum in a different cell

essta

New Member
Joined
Jun 19, 2019
Messages
5
Thank you so much for the opportunity to ask questions of the experts (I hope my Q wont be too primitive ). I am summing a column of numbers, using sumif, to only sum the pay of the hourly workers. I typed in the function to do that, and believe it or not it works. But I need the user to be able to choose what to sum by clicking a cell that specifies the criterion of what to sum eg. hourly or salaried. If I rewrite the function each time replacing the criterion, it works, but it won't do. If the choice (criteria) of what they want totaled is located in some cells outside the table, I need to bring that choice into the function. It does work if I use a cell reference ie j4 instead of "hourly" but I still need the j4 or j5 to get into the function.Thank you so much!Essta
 
In G6, run Data Validation and select "List" and then type your two options, separated by a comma.
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top