Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

How to create buckets with a formula

Topic Labels: Formulas
260 4
cancel
Showing results for 
Search instead for 
Did you mean: 

Seeking help with a “If” formula to create buckets in a new column. For example, in column A i have series of different percentages. IN column B i wish to create a formula and returns a “text” if it meets the criteria…for example, if A1 = <100, “<100”, ifA1 = 100to120, “120”, ifA1 = 121to140,“140” and so on.

Hope you can help

Cheers

4 Replies 4

Hey Sam, I’ve created something for you here that should solve your problem. You can duplicate the base by clicking the title of the base at the top of the screen and then click the three horizontal dots on the right, allowing you to modify it as needed.

Here’s the formula used in the table:

IF(
  {Column A} < 100, "<100",
  IF(
    AND({Column A} >= 100, {Column A} < 120), 120,
    IF(
      AND({Column A} >= 120, {Column A} < 140), 140,
      BLANK()
    )
  )
)

Thanks Adam,

This helps…what if the values are percentages, how would I represent that?

Cheers

Hm, the percentage values work off the basis of 1, i.e. 100% is 100, 50% is 0.5, 130% is 1.3, etc

So we’d just modify the checks to accommodate that:

IF(
  {Column A} < 1, "<100",
  IF(
    AND({Column A} >= 1, {Column A} < 1.2), 120,
    IF(
      AND({Column A} >= 1.2, {Column A} < 1.4), 140,
      BLANK()
    )
  )
)

Got it, thats worked…thanks