Google spreadsheet Conditional Formatting rows depending on dates on current and another sheet - spreadsheet

So I have Sheet1 and Sheet2 (in one spreadsheet) where:
Sheet1 contains data from A:E
Sheet2 contains data from A:K
I need to lookup the Sheet1 B cells text in Sheet2 A cells and return Sheet2 J column value (which contains dates) and if Sheet2 date < TODAY then conditional formatting should apply.
I used this formula for conditional formatting:
VLOOKUP($B:$B,Sheet2!$A:$K,10,0)<TODAY()
This works well if I want to use it just to show the values but conditonal formatting are not applying to cells
Update:
I tried it with a simpler function. I have added the dates to the F column and used the following conditional formatting formula:
F:F<TODAY()
Still doesn't work.
PS: I made sure the formats are set to DATE where DATEs are present.

Try INDIRECT function according to advanced conditional formatting description:
Note: Formulas can only reference the same sheet, using standard
notation "(='sheetname'!cell)." To reference another sheet in the
formula, use the INDIRECT function.

Related

Spreadsheet - Conditional formatting cells based on other cells

Conditional formatting a cell is simple enough. It's also simple enough to conditionally format a single cell based on another single cell. What I'm not sure about is doing it for many cells in such a way that I don't have to format each individual cell. For example:
Suppose the cells in column A either have a string, or are blank. How can I set conditional formatting on the cells in column B, such that the formatting is only applied if the A column cell on the same row (ie, the adjacent cell) is blank?
So far, I've been working around this issue by wrapping the formulas of the cells in B with IF(ISBLANK(A1),0,"FORMULA"), then applying conditional formatting to the B cells based on whether the cell values equal 0. Is there a better solution than this?
Yes, in my opinion. For LibreOffice Calc select ColumnB, Format > Conditional Formatting..., choose Formula is and enter:
A1=""
then a style of your choice and OK.
You might want to reduce the upper limit of Cell Range.
Apply the condition to Column B:
And use the following formula:
=NOT(ISBLANK($A1))
This will result in something like this:
=NOT(ISBLANK(OFFSET($A$1, ROW()-1, 0, 1, 1)))

Conditional formatting based on formula addressing current row in LibreOffice Calc

I have a column of cells in LibreOffice Calc with conditional formatting to apply a style to those cells.
The conditional formatting is programmed to format the cell if the following formula is true:
AND(B106=0,C106=0)
The trick is that instead of always evaluating this formula for row #106, I would like to evaluate the formula for the current row.
For example, in cell A1, I would like the conditional formula to be
AND(B1=0,C1=0)
And in cell A2, I would like the conditional formula to be
AND(B2=0,C2=0)
What I'm looking for is to program the entire column with a conditional formula like
AND(BCURRENTROW()=0,CCURRENTROW()=0)
but obviously that syntax is incorrect.
How can I accomplish this?
A conditional formatting based on a formula has two settings that determines where and how it applies.
First is the Cell Range to which it applies to. If this is
Range : A1:A1048576
then it applies to the whole column A.
Second is the formula itself. Precisely whether cell ranges in that formula are relative or absolute or mixed. As in all other formulas, a relative cell reference is A1 for example. A absolute cell reference is $A$1 for example. And mixed cell references could be $A1, where column A is absolute but row is relative, or A$1, where column is relative but row 1 is absolute.
So a conditional formatting applied to range A1:A1048576 and having formula AND($B1=0,$C1=0) should fulfilling your requirement. As you see the formula always gets columns B and C (absolute) but gets the row in which it is actually calculated (relative).
Example:
If you want to paint all row with a color when the column "B" CONTAINS a value, for example "XXX" you can do this:
Format-> Conditional Formatting (Add)
We select "formula" and we put:
SEARCH("XXX";$B2)>=0
We apply the style "Good" (To view selected rows in green)
And we select the matrix in we want actuate (important!), by example :
A2:H109
Now we see all the rows where the column B contains "XXX" in green.
enjoy !

Using conditional formatting in excel, I want to highlight the value in the range if matches with value given in cell B1

Using conditional formatting in excel, I want to highlight the value in the range if matches with value given in cell B1.
Assuming the relevant range is as in example, select A1:A10 and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=A1=B$1
Format..., select choice of formatting, OK, OK.

Highlight a cell if its copied to another sheet

I have a formula that will copy values from one column on Sheet B to another column on another Sheet A. What I'd like to do is highlight the cells that were copied on Sheet B and highlight the cells in Sheet A that are not on Sheet B, essentially the inverse of the first part. On Sheet B only columns G and H would be highlighted but Sheet A could be from column A to H.
=IFERROR(INDEX(Sheet2!G$3:G$7,MATCH(1,INDEX((Sheet2!$D$3:$D$7=$A3)*(Sheet2!$B$3:‌​$B$7=$C3),),0)),G3)
You could set up conditional formatting with the same logic to change the colour or either the cell that you are setting or the one that you are copying from.
Beware: this kind of code can make your spreadsheet very slow if over used.
So in one range (sheet 2) , you would have conditional formatting set up to highlight the cell if
this match failed
MATCH(1,INDEX((Sheet2!$D$3:$D$7=$A3)*(Sheet2!$B$3:‌​$B$7=$C3),),0)
In the other range (sheet 1 a:h)
you would highlight if ISERROR(INDEX(Sheet2!G$3:G$7,MATCH(1,INDEX((Sheet2!$D$3:$D$7=$A3)*(Sheet2!$B$3:‌​$B$7=$C3),),0)))
has picked the value from sheet2
I may have incorrectly butchered your code, but you should get the idea. Where you currently have a range of values, select the range, insert the conditional formatting, but edit the range to only check the first cell, it will automatically increment for you (if you remove the appropriate $ signs)
conditional formatting intro

Moving Data between Worksheets based on a key

In both worksheets I have a key in column A. Not all of the key values are in both worksheets.
For each key value in column A of Worksheet 1, I want to find the corresponding key in worksheet 2 and move the data in column B of worksheet 2 into column B of worksheet 1.
I have never programmed a macro so I am completely lost for writing this code.
There is no need for VBA here, Philip.
Try this formula in cell B1 of Sheet1:
=IFERROR(vlookup(A1,Sheet2!A:B,2,false),"")
If you are on XL 2003, then do this:
=IF(ISERROR(vlookup(A1,Sheet2!A:B,2,false)),"",vlookup(A1,Sheet2!A:B,2,false))
Then drag this formula down for the rest of your data in Column A of Sheet1.
NB - Sheet2 is the assumed name of your Worksheet2, you may need to change to fit your needs.
NB2 - you can lookup vlookup in Excel Help (or online) to better understand what it does
Are you sure you need to use a macro for this? It sounds to me like you are using Excel and a simple VLOOKUP formula would do what you need.
A VLOOKUP looks like this: =VLOOKUP(A1,Sheet2!$A:$B,2,FALSE)
Where A1 is your reference cell (in this case you "key" in column A).
Sheet2!$A:$B is the lookup table (in this case columns A and B from the second sheet).
2 is the column number that you want data from, counting from the left (in this case the second column, column B)
FALSE tells the formula to only return values for exact matches. TRUE returns the closest match in the lookup table.