Multiple rows Color Scale - excel

I have two columns, F and H. The data is between F2-F75 and H2-H75. F has the required stock level. H says how much stock is needed.
I would like to make a Conditional Formatting rule for every row in column H that formats the cell with a colour to show how much stock is required, by looking at the corresponding cell in column F. This works fine for a single row, but I have 75 rows, and manually creating a new rule for each row will take a long time. I have tried using the format painter which works for changing which cell the rule applies to, but it does not change the maximum cell to the respective one, it keeps it as is from the original formula. I have tried setting the maximum to:
=$F$2:$F$75
but this returns the error:
This type of reference cannot be used in a Conditional Formatting formula. Change the reference to a single cell, or use the reference with a worksheet function, such as =SUM(A1:E5).
This works fine for H2-F2, but I would like to have it for H2-H75 and F2-F75:
Is there another way of doing this?

Related

Excel - General formula to reference a cell in a certain column with varying row

In my worksheet in column F I have a list of names, that may appear or disappear according to other inputs in the spreadsheet. I want the cells in the columns G:AZ to remain blank if the corresponding cell (i.e. same row) in column F is also blank. Because I have thousands of cells to which I need to apply this, I'm using Pullover's Macro Creator to add this small change to all the formulas inside the cells really quickly, so I can do entire columns in seconds. In column J, for example, I've been applying this formula:
=IF(COUNTBLANK(INDIRECT("RC[-4]",0))=1,"",[this part changes and doesn't matter])
You can see that I need to change that "-4" to different numbers according to the column I'm working on. But I have so many columns that it's still going to be a pain to change that hundreds of times.
My question: Is there a formula I can use in the COUNTBLANK function that can reference the corresponding cell in column F without needing any changes in different columns and different rows? And since the INDIRECT formula is so volatile (I still don't know what that means, but I guess it's bad), is there a solution that doesn't use this formula?

Conditional Named Range for Scatterplot Data Series

I need help making a scatterplot with multiple data series using named ranges. I made up some data in the attached pic, but my data looks similar to what is shown in the attached pic, except it goes on for a thousand rows. I would like to create a scatterplot where the first series x-values (column B) and y-values (column C) are those corresponding to Type 1 (column A) only, where the second series x and y values are those corresponding to Type 2 only, and so on and so on. Basically, I need a formula for a named range that scans column A, identifies all the Type 1s, then sets the range of x-values in column B to be those corresponding to Type 1 only. Same for the range of y-values in column C. Then repeat the process for Type 2, and so on. Essentially, I need a formula for conditional named ranges. My goal is to make a scatterplot similar to that shown in the attached pic (which I did manually the cumbersome way, not using named ranges). Any help you can give me would be greatly appreciated.
Excel_Example_Data
Excel does not automatically identify series based on row data. However, assuming that know the unique values that may come for type (column A) beforehand, you may use the below workaround. First, enter the formula =B2 in cell D2. This is simply to make the range selection easier later on and can be omitted but then you will have to select the disjointed range when making the chart by using Ctrl key.
Next, in row 1 from column E onward, enter the distinct values for Type that you expect will come in the data (see cells highlighted in Yellow). This is to simulate different series of data.
Now, simply enter this formula in cell E2:
=IF($A2=E$1,$C2,NA())
and drag it down and to the right till the last row and last column. If you look at the data, this has simply added the value of Y under the appropriate type and all other types are #N/A (this is required because any other text or blank will be considered ax 0 by the graph and it will mess up the view.
Once this is done, it is easy, simply select the range from D2 till last row and last column of your data and add the scatter chart. It will give you the view you are looking for. You may then modify the series name, chart title etc. by using the chart options.

Select all data in Excel by column name, omitting empty cells

The goal is to create a series of graphs that will update automatically based on the raw data.
So, I have created a graph manually and want to edit the formula to accomplish the auto update.
The column names will always be the same, so I want to be able to select all data in a column based on the name BUT ignore any cell that is blank (above zero maybe).
The formula excel has given me so far is
=SERIES(rawdata!$M$1:$M$6,rawdata!$A$2:$A$37,rawdata!$M$2:$M$37,1)
So, something like
=SERIES(rawdata![column name],rawdata![column name],rawdata![column name],1)
I'm not sure how the skipping blank columns should work either. To expand on this further only one of the columns can potentially contain blank values. So if a cell is blank in that column then that entire row shouldn't be plotted, if that makes sense!
strong text =OFFSET(Sheet1!$B$2,0,0,COUNTA(Sheet1!$B:$B) - 1)
Try this formula when you define the name for the column of values you would like to have data automatically added from. I know it works when each cell has either a formula or a value. Like a column that is automatically calculated based on values in other columns.
In this formula example the cell B2 refers to the first point of data in the column. (make sure your references are absolute! ie, use $B$2)
This automatically returns the range of data as it changes when CountA is added:
=OFFSET(reference, rows, cols, [height], [width])
=COUNTA(value1, [value2], ...)
Hope this helps! It worked for me! :) If you have completely blank cells in the column you might have to make a couple changes though.
-Reverus

Excel Conditional Formatting - Text contained in List?

Another Excel Conditional formatting, haven't been able to find a relevant answer yet.
I have two sheets with data. Sheet2 has simple list of finished items (all in Column B). The Sheet1 has a table of when an item needs to be done according to date - each new column is a date, and the rows underneath have items to be finished. I am hoping to have the items in Sheet1 be colored green once they are added to the finished list in Sheet2. The table in Sheet1 is tied to other spreadsheets, and updates daily, so I need something that is fluid (ie, I can't manually color the cells, as the item to be finished might change dates).
I have gotten this to work for single columns at a time using "=MATCH(B4, 'Sheet2'!B:B)" (for column B on sheet 1, where the items I need formatted begin on row 4). However, I can't enter in this conditional formatting for every column (well, I'd rather not). Is there a way to have every cell in Sheet1B4:Z41 look at Sheet2B:B, detect if that value is in Sheet2, and then be formatted (colored) appropriately?
Let me know if I need to clarify this more, busy day and I'm writing fast.
Thanks!
All you need to do is make the lookup range an absolute reference, i.e.
=MATCH(B4, 'Sheet2'!$B:$B, 0)
Conditional formatting rules also adhere to absolute and relative references so if you apply a rule A1=B1 to a range A1:C3 then C3 will check if C3=D3, in this case C4 checked Sheet2!C:C.
You should also use 0 for good measure unless you know the elements in Sheet2!B:B are ordered and a subset of elements in Sheet1.

How to determine current row?

I am using Conditional Formatting to try and change the colour of a cell in column A if the text in Column B is certain values. Currently my three formula's are this:
=$B$2="Low"
=$B$2="Good"
=$B$2="High"
I need a way to quickly push this to all 50 columns therefore I thought if I could change the formula to the following it would work I just don't know how:
=$B$ThisCellsRow()="Low"
=$B$ThisCellsRow()="Good"
=$B$ThisCellsRow()="High"
You're using absolute cell references (the $ in the address), which prevents Excel from adjusting the address as you add/remove rows and move the formula around. If you use $B2 instead, as you drag down the formula, Excel can adjust it to be $B3, $B4, $B5 and so on. With this format, the B column remains constant, and the row portion is flexible.

Resources