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.
|