# Division Formula

#1

I cannot seem to get a simple division of two fields to work. What am I missing? My goal is to find the percent utilized. January hours scheduled divided by the total number of work hours in Jan. Both of these fields are themselves a calculated value, not sure if that matters.

My formula looks like:

JanuaryTotalHoursBooked/JanMonthlyAvailHours

The formatting tab is set to percentage. (returns error with integer too)

It returns #errror!

Thanks

#2

Perhaps it has something to do with the format of the two fields you are dividing - what format are those calculated fields?

#3

The two fields are both formula fields - integer formatting. So the values are like 120/176. And really it should be (120/176)*100 = percentage

Can division be done on formula fields? How might I work around that if that’s the case?

Thanks!

#4

There shouldn’t be a problem with those fields, Double-check you’re pulling the fields you think you are, that they are indeed integers, and you have no duplicate names. And `{JanMonthlyAvailHours}` isn’t 0, it?

#5

They are not duplicated names.
The avail hours is not 0. This is the formula in that column - IF({WeeklyHours} =40, “176”, “120”) If weekly hours are equal to 40, then 176. Else 120. Is what I was going for. It does populate the right values.

This might be where the issue is. The other field is an integer, but this one (JanMonthlyAvailHours) gives me this message on the Formula Formatting tab “Your result type is not a number or a date. Formatting options are currently only available if your result is a number or a date.”

176 and 120 are integers, but maybe I do not have the right syntax?

Thanks for your help! I just started looking at AirTable this week for a specific need we have. I’m nearly there to say Yes! This tool can work.

#6

`IF({WeeklyHours} =40, "176", "120")` does not give you an integer; it gives you a string.

You want

`IF({WeeklyHours} =40, 176, 120)`

That should allow your division to happen error-free.

#7

Yes! That fixed the problem! Thank you!!