Change the color of x number of cells based on the numeric value from another cell (in multiple rows) - vba

My question is basically the same as this one (Change the color of x number of cells based on the numeric value from another cell) with one extra condition: for multiple rows.
enter image description here
So on the left side, there's a column "PTO 2018 Total" (range= I3:I80) and I want to color each row (range= J3:S80) based on the number of the column I, like I manually did for the first two rows.
Thank you so much in advance.

Use conditional formatting:
Use a formula rule with the formula:
=AND(COLUMNS($J1:J1)<=$I1,ISNUMBER($I1))
Applied to
=$J:$S

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 !

How can I use Conditional formatting formula in the filter in the Gsheets to select 2 or more columns where cells that are not empty in both?

so I have ABCDE columns and I want to see rows of the cells that are not empty in the C as well as D column. how do I do this? I know I can have one column do that but that way it would exclude the information in the other column.
Let me know if this doesnt make sense. I'll try to explain with an example
I am a little confused by your question as to whether you are trying to use Conditional Formatting or to create a filter.
If you are trying to use Conditional Formatting:
It sounds like you are trying to highlight a row if there is not a blank cell in column C and not a blank cell in column D of that row.
Create a Conditional Formatting rule with the following:
Apply to Range A1:E1000 <-- (or however many rows of data you have)
Format cells if... SELECT "Custom formula is"
=or(NOT(isblank($C1)),NOT(isblank($D1)))
Formatting style Pick a color to highlight the row
This rule will highlight columns A-E for each row that has data in both column C and column D.

Excel 2013 conditional formatting using a formula

I have a spreadsheet in Excel 2013 with Location in Column A, Material Number in Column B and types or groups of materials sorted by material number in Column I J & K. Other columns contain data that is irrelevant here.
Column B can contain the same material number in multiple cells.
I'm trying to find a simpler way to format font and color of the items in Column B by comparing if the item is located in Column I J or K, or not at all (no formatting in that case).
I was entering an individual conditional rule to compare Column B with the value in cell I3, another rule for I4, another rule for I5 and so on.
This is getting unwieldy due to the number of items now in I J & K.
There has to be a simpler, more elegant way to do this. Conditional formatting using exact match is not letting me select a range of cells for the match value.
I just need to format the text in Column B to Bold and Blue if the number exists in Column I also, or Bold and Red if it exists in Column J or Bold and Green if it exists in Column K.
Set up a conditional formatting rule that uses a formula. The formula can contain a Countif function that counts how many times the value in cell B in the current row is counted in column I. For example, starting in row 2, select B2 and add a formatting rule with the formula
=COUNTIF($I:$I,$B2)
Take care to use the current row number in the formula and don't use a dollar sign $ in front of the row number. Set three rules, one for column I, one for J and another one for K.
You don't need a new set of rules for each row. Just apply the three rules to all the rows required.

Alternate Cell Color in a column B for particular range say B67 to B323

I need to color alternate cells in a column in Excel via vb,basically requirement is if B1 value is selected like4/6/8/10/12 a table gets generated (done) and then with a particular pattern cells should be colored.I have done manually for few of them but requirement is to color alternate cells from B67:B323 in a column B.
There's no need for VBA for this. Use conditional formatting instead.
=MOD(ROW(),2)=0
MOD(ROW(),2) will return 1 for odd numbered rows, and 0 for even.