Skip to main content

How to create buckets with a formula

  • May 17, 2022
  • 4 replies
  • 58 views

Forum|alt.badge.img+2

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

TheTimeSavingCo
Forum|alt.badge.img+31

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()
    )
  )
)

Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • May 22, 2022

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


TheTimeSavingCo
Forum|alt.badge.img+31

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()
    )
  )
)

Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • May 22, 2022

Got it, thats worked…thanks