# Looking for a formula to copy and divide or not divide a result based on a third column

✭✭✭✭

Shown above are expenses funded by either one or multiple grant funds. I've created the formula to copy and divide the Quote Total into the Total column if there are multiple Grand Funds. How do I add onto the formula to copy the Quote Total into the Total without dividing it if there is only a single Grant Fund? Basically if the criteria is not met, copy without dividing.

Here is my formula so far.

=(IF([Grant Fund]@row = "EDA SMART MEMS and ODHE Super Rapids", [Quote Total]@row / 2))

Thank you

• Overachievers
edited 08/05/24

Hi @Delilah

There are a couple of ways of looking at this one. If you know the entry for two grants is

"EDA SMART MEMS and ODHE Super Rapids"

and the value for one grant is a

"ODHE-OWT Super Rapids"

Then you could do the following nested IF formula

=(IF([Grant Fund]@row = "EDA SMART MEMS and ODHE Super Rapids", [Quote Total]@row / 2),IF([Grant Fund]@row = "ODHE-OWT Super Rapids",[Quote Total]@row,""))

If you have multiple different combinations of grant funds then you will need a different approach, but I can try and help with the formula if you need that, just @ me in the reply

Hope that helps

• ✭✭✭✭

Thanks Gillian.

"EDA SMART MEMS and ODHE Super Rapids" will always be the multiple funds but it could any other funding that would be single source. So I need a formula that says if the funding is anything but those two, copy the quote total and do not divide.

• Overachievers
edited 08/05/24

Hi @Delilah

So if the funding is anything other than those two then your original formula only needs a small alteration

=(IF([Grant Fund]@row = "EDA SMART MEMS and ODHE Super Rapids", [Quote Total]@row / 2),[Quote Total]@row)

Basically what the formula above now saying is:

If the [Grant Fund] formula contains "EDA SMART MEMS and ODHE Super Rapids" then [Quote Total]@row/2, if it doesn't contain that text then [Quote Total]@row

Hope this works for you :)

• ✭✭✭✭

Thank you! That worked, I just had to move the second ending comma to the end.

=(IF([Grant Fund]@row = "EDA SMART MEMS and ODHE Super Rapids", [Quote Total]@row / 2,[Quote Total]@row))

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!