Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Applying a function to multiple cells

How do I apply a function to multiple cells or an entire column? It seems as though it should be very simple, but I cannot do it nor can I find instructions on how to.

Posted on Apr 6, 2012 11:10 AM

Reply
Question marked as Best reply

Posted on Apr 6, 2012 11:18 AM

Hi c,


Enter the formula into one cell, then Fill down to place the formula into other cells in the same

column (or Fill Right to place the formula in other cells in the same row).


The Fill operation may be done manually, by dragging the Fill control handle (small circle) at the bottom right corner of the selected cell, or using a menu item, by selecting the cell containing the formula and the ones below it into which the formula is to be copied/filled, then going Insert (menu) > Fill > Fill down.


Details may be found in the Numbers '09 User Guide, one of two excellent manuals available through the Help menu in Numbers. The other, the iWork Formulas and Functions User Guide lists, describes and gives examples for all of the Functions supported in Numbers. Both are searchable PDF documents, well written, and easy to read.


Regards,

Barry

9 replies
Question marked as Best reply

Apr 6, 2012 11:18 AM in response to casselease

Hi c,


Enter the formula into one cell, then Fill down to place the formula into other cells in the same

column (or Fill Right to place the formula in other cells in the same row).


The Fill operation may be done manually, by dragging the Fill control handle (small circle) at the bottom right corner of the selected cell, or using a menu item, by selecting the cell containing the formula and the ones below it into which the formula is to be copied/filled, then going Insert (menu) > Fill > Fill down.


Details may be found in the Numbers '09 User Guide, one of two excellent manuals available through the Help menu in Numbers. The other, the iWork Formulas and Functions User Guide lists, describes and gives examples for all of the Functions supported in Numbers. Both are searchable PDF documents, well written, and easy to read.


Regards,

Barry

Aug 7, 2015 9:24 AM in response to Barry

Thank you for your response. I hope that you can help me figure this out. The version of numbers that I'm using is 3.5.3.


Here are the formulas I'm trying to apply...


Formula to separate the last names: =LEFT(A,FIND(" ",A,start-pos)−1)


Formula to separate the first names: =RIGHT(A,LEN(A)−FIND(" ",A,start-pos))


There has got to be a way to apply these formulas or some type of formula to an entire column.


Thanks in advance!!

Aug 7, 2015 3:15 PM in response to PlacerPlaytimePublications

Hi PPP,


Unless you are in a region where three and five tenths would be written 3,5 rather than 3.5, I can't see a syntax error in the formulas. If your region's decimal separator is a comma, then changing the commas in the formulas to semi-colons ( ; ) should correct the syntax error.


If copy your formula from here and paste it into B2 of a table where A2 contains a 'name' (text string containing one or more letters, a space, and one or more letters, I do get an error triangle, but the message is ' "start" is not a valid reference. '


That will happen if you have entered the text "start-pos" from the keyboard, and it appears as plain text in the formula. If you inserted the formula, "start-pos" should be enclosed in a lozenge shape, similar to the illustration below, and the formula will work as intended.User uploaded file

From the notes on FIND in the Function Browser:

start-pos:

"An optional argument that specifies the position within the specified string at which the action should begin. start-pos is a number value that must be greater than or equal to 1 and less than or equal to the number of characters in source-string."


You can omit this optional value by deleting the lozenge AND the comma immediately before it. Numbers will assume a value of 1, and start searching at the first character in the 'name'.


Here's a sample table with your two formulas (with ",start-pos" deleted from each) entered in cells B2 and C2:

User uploaded file

B2: =LEFT(A,FIND(" ",A)-1)

C2: =RIGHT(A,LEN(A)-FIND(" ",A))


A formula places its result in the cell containing the formula.

To 'apply the formula to an entire column,' you will need to place a copy of the formula in each cell where you expect to see a result.

Start with the formula entered into the top cell that is to contain it. Select that cell by clicking on it (once).

Now grab the Fill handle (small circle) and drag down.

In Numbers v2, the fill handle is at the bottom right corner of the selected cell(s). Here, two cells, B2 and C2 are selected. The fill handle is shown in the green circle. In Numbers 3, the fill (down) handle has been moved to the center of the bottom of the selection rectangle bordering the selected cells.

User uploaded file

Place the mouse on the fill handle. When the pointer changes to a black + sign, press the mouse button and drag down to fill the formula(s) into the rows below.

User uploaded file

As the formula is filled into each row, the result will appear in that row.

As the formula is written to separate the 'name' at the space between the first and last name, it will work correctly only if the name consists of a group of letters (first name) then a single space, then a second group of letters (last name), as in rows 2, 3 and 4 of the table.

If the name consists of three 'words,' as in rows 5 and 6, FIND will find the first space, and the formulas will split the name there.

If the cell in column A is empty (or if it does not contain a space), FIND will throw an error saying it could not find " " and the cell will display an error triangle, as in rows 7 through 11.


For tidiness, those error triangles can be eliminated by enclosing the formula in an IFERROR statement:

B2: =IFERROR(LEFT(A,FIND(" ",A)-1),"")

I would suggest doing this only after you have the basic formula working, and have tested filling it into a few rows. Then edit the top row version and repeat the fill, this time continuing to the bottom row of the table.


Regards,

Barry

Oct 23, 2015 1:22 PM in response to aMi_B

select the cell in column D, then type the formula:

=B-C


now select the cell you just entered the formula in, copy

select the column D by clicking the Column header (the "D" at the very top), paste



things do not look the same because the images posted are showing tables from Numbers '08 (ver 1.x) or '09 (ver 2.x) and you may be using Numbers version 3.x

Applying a function to multiple cells

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.