Numbers Only Formula

Hello,
I am trying to have the column "Order/Job #" automatically populate the 6 digit number of the parent row in the column "Customer or Task Name". So basically in the screenshot below, in the WHITE row, column "Order/Job #", it would say 661181. Basically, there will be multiple children rows under each parent, and I don't want to have to type the Order # each time, but need that info for reporting. If there's no numbers in the parent row, I want it to just be blank. Is that possible?
Best Answer
-
What does this do for you?
=IF(COUNT(CHILDREN([Customer or Task Name]@row)) = 0, IFERROR(VALUE(LEFT(PARENT([Customer or Task Name]@row), 6)), ""))
Answers
-
Try this:
=IF(COUNT(CHILDREN([Customer or Task Name]@row)) = 0, PARENT([Customer or Task Name]@row))
-
Thanks for this Paul! This populated the whole cell. Is there a way to only populate the numbers? The number would always be 6 digits, so I just need the 6 digits "661181". However, if there is no numbers and only text, I want the Order/Job # column to be blank.
-
Try this:
=IF(COUNT(CHILDREN([Customer or Task Name]@row)) = 0, LEFT(PARENT([Customer or Task Name]@row), 6))
-
This totally worked for the numbers! one last thing; is it possible to have it be blank if there are not numbers at the beginning? If it is just text, I want the column to be blank.
-
What does this do for you?
=IF(COUNT(CHILDREN([Customer or Task Name]@row)) = 0, IFERROR(VALUE(LEFT(PARENT([Customer or Task Name]@row), 6)), ""))
-
That did it! Thank you Paul!
Help Article Resources
Categories
Check out the Formula Handbook template!