LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-25-2012, 09:19 PM   #1
Pedroski
Senior Member
 
Registered: Jan 2002
Location: Nanjing, China
Distribution: Ubuntu 20.04
Posts: 2,116

Rep: Reputation: 73
not really a Linux question but maybe .......


In Libre Office, I want to mark cells containing an F red. I think I need a for c=1 to X kind of loop. Maybe this can be done differently.

So, I need to search A1, A2, A3 B1 B2 B3 and so on, then do an ‘if content = F, background colour=red’

Can you help me do this please?

I would generally like to know how to search a sheet for a given content and then act upon it if the search throws up TRUE.

If you could just show me how to do this for say, A1 A2 A3, I’m sure I can fudge the rest!

I think I could do this with a LibreOffice basic macro

for c=1 to 3
for r= 1 to 3

if Acr = F then [format cell backgroundcolour = red]

The problems I see are:
1) Acr could be a cell, the third cell after z (Ac1), so how do I make sure the basic routine reads A’variable c’‘variable r’ Maybe A$c$r???

2) Given Acr = F is true, how exactly do I tell the routine to format the cell background? Something like ‘then Acr$CELL_BACKGROUND=RED’ ?? Which variable tells LibreOffice to paint the background of a cell red?? How would I do this exactly?

I know this can be done using Conditional Formatting, but that still involves entering the details for every range, on every sheet by hand. If I have a macro, I can point it at the entire file, and done!

Thanks for any tips.
 
Old 10-26-2012, 12:16 AM   #2
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Hi:

I'm not the expert with this but this help concerning Libre Office might help.
http://help.libreoffice.org/Common/Number_Format_Codes

I (think) to search a sheet you would just use the find function by holding down Ctrl + f it should find what the given content your looking for. If not I'm pretty sure Libre Office has a find/search or the magnifying glass icon that you can utilize.

Here's a Libre Office Writer guide:
http://wiki.documentfoundation.org/i...terGuideLO.pdf

Hope this helps; Good Luck!

Last edited by Ztcoracat; 10-26-2012 at 12:18 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
linux distro question & mysql install question natalie.aloi Linux - Newbie 5 07-19-2009 08:28 PM
Question writing workshop for Linux+, experienced Linux administrators needed cbalkcom Linux - News 1 10-12-2008 03:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration