AppleScript - Creating forumula and inserting text in a range

H

HomerNet

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I have a spreadsheet that I create on a daily basis. Part of the process for creating this spreadsheet is to add a field for a barcode. This requires the creation of a column for the barcode and a column for the special character (*) that heads and ends the barcode.

I can create the columns and title them as appropriate, and I know the proper formula to create the barcode prior to applying the barcode font.

Here's where I'm stuck:

I need to, using a script, add a * to the last cell in each row of a table and ONLY the rows in the table, then add a formula [=CONCATENATE(cell1,cell2,cell1)] to the first cell in a row. So far I haven't been able to figure out how to select the appropriate range of cells nor have I been able to add the necessary information to each cell.

In other words:

Here's a sample table -
A | B | C
1 | Barcode | Serial Number | *
2 | =concatenate(C2,B2,C2) | 123456 | *
3 | =concatenate(C3,B3,C3) | 123457 | *

I can manually add the * in C, and manually add the formula in A, but I need to be able to script this.

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top