arrow formatting with google docs info

2,362 views
Skip to first unread message

eric engen

unread,
Sep 25, 2011, 7:11:10 AM9/25/11
to Google Visualization API
hi and thanks in advance to any and everyone who will take the time to
answer my question.

at the firm i work in we use google docs a lot and i would like to
have somekind of script or something that will show me a small up/down
arrow for different cells by comparing them to a value from last
week( i have a sheet for every week of the month)

if i wasnt clear enough then: last week say my new york shop sold
5000$ of goods and this week 3000$ of goods and i want to have a small
red arrow indicating that the sale of the new york store has gone down
as opposed to last week

thank you for any help' im not a programmer but i know my way around
computers and i believe with just a few small nudges in the right
direction i will get the results i need

ChartMan

unread,
Sep 25, 2011, 1:55:51 PM9/25/11
to google-visua...@googlegroups.com

Do you need this table with arrows to show up in Docs or just in a web page?

> --
> You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
> To post to this group, send email to google-visua...@googlegroups.com.
> To unsubscribe from this group, send email to google-visualizati...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
>

eric engen

unread,
Sep 26, 2011, 3:35:56 AM9/26/11
to Google Visualization API
i'd rather have it show up in google docs but if their's only a way
(and i've noticed that there is a possibility to "publish" said
document to the net for free) to do this with an online document that
thats just what i'll have to deal with.

thanks again

On 25 ספטמבר, 20:55, ChartMan <chart...@google.com> wrote:
> Do you need this table with arrows to show up in Docs or just in a web page?
>
> -הסתר טקסט מצוטט-
>
> -הראה טקסט מצוטט--הסתר טקסט מצוטט-
>
> -הראה טקסט מצוטט-

Riccardo Govoni ☢

unread,
Sep 26, 2011, 5:28:45 AM9/26/11
to google-visua...@googlegroups.com
Would something like this be good enough?


I used a combination of spreadsheet functions, unicode characters and conditional formatting.

First I defined a function that, depending on the comparison of 2 cells (this week vs last week), produces an up arrow or a down arrow:

=IF(B2>A2, "⇧", "⇩")

For the arrow themselves, I used two unicode arrow symbols
Last I applied some conditional formatting to the column, specifying that the font color should be green if the cell contains an up arrow, and red otherwise.

-- R.

ChartMan

unread,
Sep 26, 2011, 7:52:08 AM9/26/11
to google-visua...@googlegroups.com

Reading my mind :-)

On Sep 26, 2011 12:28 PM, "Riccardo Govoni ☢" <battl...@gmail.com> wrote:
> Would something like this be good enough?
>
> https://docs.google.com/spreadsheet/ccc?key=0Av88pFrCTjLhdFhqMVVTZzZJdWYtT0lYTTV3elpseEE&hl=en_GB
>
> I used a combination of spreadsheet functions, unicode characters and
> conditional formatting.
>
> First I defined a

> depending on the comparison of 2 cells (this week vs last week),
> produces an up arrow or a down arrow:
>
> =IF(B2>A2, "⇧", "⇩")
>
> For the arrow themselves, I used two unicode arrow

eric engen

unread,
Sep 26, 2011, 8:00:43 AM9/26/11
to Google Visualization API
its a pain of a workaround 'cause i really need the function to draw
its info from another sheet(within the same document)

i found this
http://code.google.com/intl/iw-IL/apis/chart/interactive/docs/reference.html#arrowformatter
but i have no idea how to use it

On 26 ספטמבר, 14:52, ChartMan <chart...@google.com> wrote:
> Reading my mind :-)
> On Sep 26, 2011 12:28 PM, "Riccardo Govoni ☢" <battleho...@gmail.com> wrote:> Would something like this be good enough?
>
> https://docs.google.com/spreadsheet/ccc?key=0Av88pFrCTjLhdFhqMVVTZzZJ...
>
> > I used a combination of spreadsheet functions, unicode characters and
> > conditional formatting.
>
> > First I defined a
> > function<
>
> https://docs.google.com/support/bin/static.py?page=table.cs&topic=25273
>
>
>
> >that,
> > depending on the comparison of 2 cells (this week vs last week),
> > produces an up arrow or a down arrow:
>
> > =IF(B2>A2, "⇧", "⇩")
>
> > For the arrow themselves, I used two unicode arrow
> > symbols<http://en.wikipedia.org/wiki/Arrow_(symbol)>
> > .
> > Last I applied some conditional formatting to the column, specifying that
> > the font color should be green if the cell contains an up arrow, and red
> > otherwise.
>
> > -- R.
>

Riccardo Govoni ☢

unread,
Sep 26, 2011, 8:29:00 AM9/26/11
to google-visua...@googlegroups.com
If the input data are in a separate sheet of the same Google document, then you can still use the same logic. The function just changes to reference a different sheet:

=IF(Sheet1!B2>Sheet1!A2, "⇧", "⇩")

I have updated the document to contain the same arrows in Sheet2, referencing the contents of Sheet1.

Or am I missing something?

The ArrowFormatter you found is useful if you accept to put your data inside a Table visualization and host the visualization in a webpage, separate from your spreadsheet (I don't think there's a way to use formatters when embedding visualizations as gadgets inside a spreadsheet, unless you're willing to roll out some code of your own to do so).

-- R.
Reply all
Reply to author
Forward
0 new messages