Excel Conditional Formatting - Text contained in List? - excel

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.

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?

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

Conditional formatting cells with lowest value per row excluding specific columns

I've looked around but haven't been able to find an exact answer to this question without learning everything there is to know about excel formulas.
I'm trying to use one conditional formatting rule to highlight one specific cell in each row in a dataset.
I've got that working with this: =AND(D5<>0,D5<=SMALL(IF($D5:$W5<>0,$D5:$W5),1))
The next part is having the formula exclude hidden columns/columns that have the header "USA" for that I have this formula: =SEARCH("US",D3)=1
Which works to highlight the cells with USA written in them.
I need to combine these two formulas to have it highlight the single lowest value in each visible row.
On a separate note I then want the highlighted value displayed at the end of the data set. This way if I update the document with a lower price it will automatically update the rest of the sheet with this information.
I am not sure of your ultimate objective (eg mention of hidden columns/columns that have the header "USA" - is that one condition or two? - and each visible row - is that because part of each row is hidden or are rows hidden as well as columns?) but your immediate requirement seems to be to combine two formulae into one for CF and for that the following may suit, assuming from D5 to Wn is selected first:
=AND(D$3<>"USA",D5<>0,D5<=SMALL(IF($D5:$W5<>0,$D5:$W5),1))

Highlighting cells in a column based on other cells dates in the same row

I have a spreadsheet that is used to track the last date a set of logs was downloaded.
We need to take logs at around the 7 day mark if possible (not critical)..
We have approximately 170 assets that we do this to.
The way the spreadsheet is set up the new date is added to an ever expanding list (rather than just overwriting) i have used conditional formatting to show that a date is less than 7 days old but that cell can be 20 columns accross and is still hard to cross reference to the asset number. I want to highlight column A if any other cell in the same row is highlighted (unless you have a less clunky way of doing it, having the date highlighted really is unimportant it is simply as far as i can get on my own.
I even tried doing a sort by cell colour but that seems to require that i pick one coulmn only.
Thanks for your help.
Conditional formatting will do this for you. I used this example:Column A has dates, Columns B and C have miscellaneous gibberish. (click the link to view the image)
Select the entire range of cells you want to follow these rules (possibly just "select all" to be sure you are getting future additions as well, then choose Conditional Formatting from the ribbon.
Conditional Formatting > Use a formula to determine...
Then enter the following code. =TODAY()-$A2<7 Update $A2 with whatever cell contains your first date value, and be sure to put a $ in front of its column reference so that the formula references only your date column and doesn't wander.Code: =TODAY()-$A2<7
Click the "Format" button to set whatever format you like (I chose yellow fill).

Efficiently update (growing) columns of data+formulas, w/ automatically updated rows of data

I have columns of data, each cell is a formula referencing data from several rows on another sheet (based on a dropdown box).
I now need to update many columns at once and simply copying the formula down into the next cell in the column, Excel tries to match the 'wrong' cells - the column is going down, the rows are going across, meaning I'd have to type in the correct cells manually every time I copy down this formula.
The rows are updated daily with pulled data/VBA and I can't touch the formatting of the columns either.
Not sure how to do this quickly. I have dates placed down each row/column, if that could be used somehow.
Shown: 2 different sheets, example of 2 rows a single cell will reference. There are many of these rows and columns. This is the formula:
=IF($B$7=1,'xx'!L619,IF($B$7=2,'xx'!M619,IF($B$7=3,'xx'!N619,IF($B$7=4,'xx'!Q619,IF($B$7=5,'xx'!Q619,0)))))
When copying the cells down, the formula updates L619, M619... with L620, M620... when instead I'd need P619, Q619...
This may help if you adapt it to your situation:
You can use the OFFSET or INDEX functions to set your spreadsheet up in such a way to transpose a horizontal row of data into a vertical column of data (and be able to drag the formula).
The trick is, you need a column (you can even hide it) with your increments in the cells i.e. 0,1,2,3,4,5,6,7...n
For example:
A1:A101 are where my increment values from 0 to 100 are.
my horizontal data starts at E15, and continues on with F15, G15, H15, etc.
This is my formula:
= OFFSET($E$15,0,$A1)
When I drag this down in a column, it corresponds exactly to the horizontal rows of data. The same thing can be done using INDEX.
Your situation sounds a little more complicated, but you might be able to build on this to suit your needs.

Resources