Forum Discussion
jcallawayBBS
Jun 08, 2021Copper Contributor
if/or/and fomulas
I'm trying to create a spreadsheet for tipping support staff in restaurant but the percentage changes if there is more than one employee on during a shift. How do I write a formula that says if more than one cell containing names is filled out, they get 6.5%, but if only one cell is filled out, they get 5%?
- Assuming A2:A20 is the name containing range, I would do something like = IF ( COUNTA (A2:A20) = 1, 6.5%, 5%)
counta just counts the number of employees, then you can modify what happens if certain criteria are met. like multiply Sales in B:B * 6.5% like, = IF ( COUNTA (A2:A20) = 1, B2 * 6.5%, B2 * 5%)
2 Replies
- DKoontzIron ContributorAssuming A2:A20 is the name containing range, I would do something like = IF ( COUNTA (A2:A20) = 1, 6.5%, 5%)
counta just counts the number of employees, then you can modify what happens if certain criteria are met. like multiply Sales in B:B * 6.5% like, = IF ( COUNTA (A2:A20) = 1, B2 * 6.5%, B2 * 5%)- jcallawayBBSCopper Contributor
DKoontz needed a slight tweak, used >1 rather than the =1, but I had no idea about the COUNTA prompt, so thank you very much, can't even describe the issues I've had trying to set this up but it's all done now