You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

Creating a task/macro in Numbers

I have a sheet in numbers with the following data:


a

b

c

blank cell

a1

b1

c1

blank cell


What I want is each in their own column but same row

a b c

a1 b1 c1


Any ideas how I can get this done? Essentially I have a directory with name and adddress and I want to export into csv but I think I need each person on their own row with their data.


I can probably export it into a csv file and use awk or various unix commands to get what I want but I'm thinking there must be a way in numbers to do this easier than writing a shell script.


thanks in advance,


Kathy

Mac mini, macOS 10.14

Posted on Apr 28, 2020 4:28 PM

Reply
Question marked as Top-ranking reply

Posted on Apr 28, 2020 6:46 PM

First run made it far too complicated.

With the data in two compact lists, each column gets a far simpler formula:

The formula shown is entered in A1 of the second table.

The second formula is entered in B1 of the second table,

Both are then filled down as many rows as needed.


A1: INDEX(Table 1::$A,ROW(cell))


The formula in B1 is essentially the same, requiring only the addition of +4 to the ROW() value as this group of data starts 4 rows below the first group.


B1: INDEX(Table 1::$A,ROW(cell)+4)


Apologies for going astray in my first reply.


Regards,

Barry


Similar questions

3 replies
Question marked as Top-ranking reply

Apr 28, 2020 6:46 PM in response to sng4u

First run made it far too complicated.

With the data in two compact lists, each column gets a far simpler formula:

The formula shown is entered in A1 of the second table.

The second formula is entered in B1 of the second table,

Both are then filled down as many rows as needed.


A1: INDEX(Table 1::$A,ROW(cell))


The formula in B1 is essentially the same, requiring only the addition of +4 to the ROW() value as this group of data starts 4 rows below the first group.


B1: INDEX(Table 1::$A,ROW(cell)+4)


Apologies for going astray in my first reply.


Regards,

Barry


Apr 28, 2020 5:29 PM in response to sng4u

Put the data in a table:




the name the table with the data "Source" (just to match my example)


then create a second table that is the dimensions of the array (4 rows by 2 columns)... like the table on the right (name "Table 1-1")

select cell A1 in that new table and type the equal sign, then type (or copy and paste the formula) from here:

OFFSET(Source::$A$1,(ROW()−1)+(COLUMN(cell)−1)×ROWS(A:B),0)


short hand for this is:

A1=OFFSET(Source::$A$1,(ROW()−1)+(COLUMN(cell)−1)×ROWS(A:B),0)


select cell A1, copy

select all the cells of the table, paste


if the array on the left table changes, then adjust the number expected rows and columns to match




Apr 28, 2020 6:30 PM in response to sng4u

HI Kathy,


OOPS—I see I tucked an extra field in there, making each record one row longer than needed. Should require only changing the 4 in the formula to a 3, and removing column C from the second table. Posting the note here, as the Edit window may time out before I finish revising the table.

B.


second note— Not quite. Different arrangement of data than noted.


Regards,

Barry

Creating a task/macro in Numbers

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