I have a script for Excel that finds and copies a couple ranges of cells
and pastes them into a new workbook. In that process the cell contents color is
changed in one of the ranges.
In the new workbook the items are sorted and one column’s contents are appended with a couple text characters.
I have a repeat loop that churns through the contents of the specific column looking for contents that are a specific color, (from earlier).
Anyway, when running the compiled script it works great. Only the specified color text gets appended.
However, when I save a Bundled App, the contents in all of the cells in the target column get appended regardless
of color.
Can anyone offer some direction for me on this?
The following is the part of the script that appears to be at issue:
tell sheet 1 of active workbook
set myVal to “Fred”
set counter to “1”
set myCol to “E”
repeat until myVal is “”
set myCell to cell (myCol & counter)
set theValue to value of myCell
tell myCell
set myColorIndex to font color index of font object as text
if myColorIndex is not “color index automatic” then
set myContents to value as integer
set myContents to myContents as text
set value to (myContents & “-N”)
end if
end tell
set myVal to theValue
set counter to (counter + 1)
end repeat
end tell
end tell
iMac
Mac OS 10.7.5
Thanx,
mike