Excel conditional formatting doesn't match formula TRUE/FALSE output - excel

This should theoretically be a simple use-case: many people in my organization have a need to regularly figure out interest earned by specific deposits or investment contributions. My sheet expedites this by allowing users to input the date and amount of each item into a table, after which it handles all the necessary calculation. The table's length is, necessarily, variable.
Because not all of my users are technically literate, I want this table to look like a table, but I only want to format rows with actual data. The automatic table formatting will not work for this use1, so I want to apply conditional formatting to each even row containing data. I wrote a formula that should work, just checking whether the row is even and whether the "amount" column isn't blank:
=AND(NOT(ISBLANK(INDIRECT("B"&ROW()))),ISEVEN(ROW()))
I've placed this formula in a column to the right of the table, and as expected it displays TRUE for every even row with data in the "amount" column, and FALSE for everything else. Trouble is, when I go to apply conditional formatting to the table area, it continues to apply formatting even when NOT(ISBLANK(INDIRECT("B"&ROW())) evaluates to FALSE, which should make the entire AND() FALSE.
So the question is: Does anyone have any idea how to resolve this? I'm stumped, since the formula outputs correctly when used on the sheet, and I can't directly evaluate it from the conditional formatting page.
1 Automatic table formatting should work for this, but my users have found ways to break it without knowing they've done so, so I need something I have more control over.

Related

New table values are not included in excel calculations

I have created a table in excel which contains information on licenses, and I have created a formula which adds the value of licenses purchased in the last 30 days. The following code seems to do the trick:
=SUMIF(LicenseList[Purchase date], ">="&(today()-30), LicenseList[EURvalue])
My only problem is, that when I add new data into my table, it is not included in the result!
This is just one calculation which doesn't work - it seems that all of the calculations which are referencing the particular table, are not getting updated (I have naturally tested that the added values indeed do become part of the table).
Crossing my fingers for some help! :)
Try the Ribbon menu item Formulas > Formula Auditing > Evaluate Formula. This allows you to see the result of each step in the formula. You can also check precedents and dependents.
Because the data was being populated into the table by a VBA script, the format was invisibly not a date. This was required for the column to be included in the formula, and even though excel told me that the whole column was set as dates, they clearly were not. By converting the values to dates using CDate() before inputting them to the table, the formula now works.

Making excel search using one letter in cell

So basically, I have been trying to make excel scan one column and print out the row for cells which have specific letters.
For example I have the following data in my sheet.
What is required is to be have excel search for the values which contain T and I, and then print the new rows. Kind of like separate the two into two different tables, because then so that I can do further analysis on them.
So far I have been trying to use the VLOOKUP() function, but the problem with VLOOKUP() is that excel required a proper match and not just a letter in the cell. I had tried with both FALSE and TRUE. Then instead I tried to use the =INDEX($B$4:$K$9;MATCH($A$17;$A$5:$A$9;0);COLUMN(A4)) to make it work. But that also does not work, since it also requires a full match. Also another problem which I didn't realise before is that how can excel recognise each cell, because I will have different number after the letters everytime and then so how can one make excel not repeat the same row twice?
I have used another approach where I copy the data in a separated sheet and then I simply filter out the Ts and then copy/paste the Is into another sheet and vice versa. it is time consuming and so it would be much better if I can simply copy/paste my new data and it would generate the division on its own.
any suggestions or link would be really helpful.
UPDATE
I had a new idea on how to approach this problem. I was thinking that is it somehow possible to have VBA code running for filtering the data. Is there a way to specify in VBA code to filter the data by "Starts With" and Make the results be printed in another cell block?
Looks simple enough. First step is to make sure you have headers over your data and that it is in proper table format similar to my picture. Then select Data set and press CTRL+T. That should turn you data in to table object with stripes. Use the Formula =LEFT(C2,1) to take out the first letter which will be L or T.
Select the table and press ALT+D+P which will generate a pivot table based off original data set.
Drag the column with the formula I suggested over to the FILTERS area of the pivot table ID column to ROWS and all others to VALUES. Simply refresh and as new data is added you will get new pivot tables. Do not put the pivot tables on top of each other as I did that is only for the picture so you can see it. If you have too many filters to apply you can right click the helper column in the pivot table fields area to produce a slicer which is a button that helps you change the report quickly. Any other questions do ask.

Excel 2013 - Alternate Highlight Rows Based on Cell Data CHANGING

I don't know much about conditional formatting in Excel. I'd like to be able to use the background color of rows to indicate "groups" of rows. One of the cells (all the same column) determines which "group" the row belongs to. I don't want to associate 1 color per group; instead, I'd like to alternate between 2 (or more?) colors. So, I am content to say, "switch colors when the value of this column changes". (I realize that will only work if I'm sorting on that column, but I am sorting on that column.)
This feels like it should be dead simple, but I haven't been able to figure it out, or even figure out how to google for it.
Here's a solution which doesn't use a helper column:
Rule 1: =MOD(SUMPRODUCT(1/COUNTIF($O$1:$O1,$O$1:$O1)),2)=1
Rule 2: =MOD(SUMPRODUCT(1/COUNTIF($O$1:$O1,$O$1:$O1)),2)=0
Important: This assumes that all instances of account numbers are always grouped together - for example it will fail if O7 is changed to "Account 1". I assume this is not an issue since you are sorting on Column O.

Excel Pivot Tables for multiple tags

I'm using Excel 365. I have a program that exports Excel files, and one field is a bunch of tags, separated by commas.
Let's say it looks something like this:
The program allows multiple tags (there's maybe 20 that could be changed in the future) to be selected as ingredients for each kind of candy. It is not a consistent number, though they seem to always be alphabetical.
I'm looking to make some kind of table by ingredient and chef, according to time, like this:
I'm trying pivot tables, but they come back with long ingredient lists, when I really want just one item per line. I also tried making an additional column for each ingredient, which searches the main column and returns yes or no based on if it's in the ingredients column. It's still not working to have a single item listed each row with pivot tables- it gets into lots of levels and sublevels that way.
It's very likely there will be more ingredients and chefs in the future, so I'm trying to stick to some pivot tables where people can push "refresh all" to get the new ones. Ideas?
If you can build your ingredients list manually and add the names across the top then you can calculate the totals using a SUMIFS formula.
=SUMIFS($F$2:$F$5,$B$2:$B$5,"*"&$A10&"*",$C$2:$C$5,B$9)
if you put the formula above in cell B10 then autofill across and down then the values will be calculated automatically.
To break it down so you understand what's going on
=SUMIFS(**$F$2:$F$5**,$B$2:$B$5,"*"&$A10&"*",$C$2:$C$5,B$9)
is the range you want to sum under the total column. It's locked using $ so it doesn't change when you autofill.
=SUMIFS($F$2:$F$5,**$B$2:$B$5**,"*"&$A10&"*",$C$2:$C$5,B$9)
The range you want to check with the tags in each cell, also locked.
=SUMIFS($F$2:$F$5,$B$2:$B$5,`"*"&$A10&"*"`,$C$2:$C$5,B$9)
The cell containing the ingredient you want to count with a star at each end to act as wildcards so it can return true when the cell contains the ingredient. The column is locked.
=SUMIFS($F$2:$F$5,**$B$2:$B$5**,"*"&$A10&"*",**$C$2:$C$5,B$9**)
last bit is the range of the chef list (locked) and the criteria above locked by row.
I can't think of a way to automate the ingredient list but hopefully the formula will help.

Excel 2010 Conditional Formatting will not use an INDEX/MATCH formula

I have a table that uses the following formula to pull data from two other tables:
=IF(INDEX(InitASIPTable,MATCH([#[EFH JST]],InitInspJST,0),MATCH(HeaderRow,TailNumberRow,0))="INITIAL CW",INDEX(SortieTime[CW-13R],MATCH(HeaderRow,SortieTime[Tail],0)),INDEX(InitASIPTable,MATCH([#[EFH JST]],InitInspJST,0),MATCH(HeaderRow,TailNumberRow,0)))
Basically, it looks at the first table to see if an initial inspection has been completed. If yes, it goes to the second table to pull the recurring inspection remainder time, if no it provides the remainder until the initial inspection. The issue I'm having is getting the conditional formatting in Excel 2010 to highlight the cells in the table to show me if the time I'm seeing is being pulled from the initial table or the recurring table. I have 12 rows x 15 columns within this table that I'm trying to lay this formatting on.
I've tried using this formula for the conditional formatting:
=ISNUMBER(INDEX(InitASIPTable,MATCH([#[EFH JST]],InitInspJST,0),MATCH(HeaderRow,TailNumberRow,0)))
However, Excel rejects that formula with a "The name that you entered is not valid" error message, even though when I drop that formula in the middle of the table it correctly returns "TRUE" or "FALSE."
I've also tried explicitly defining every range and while Excel accepts the rule, it doesn't apply the conditional formatting. Here's the modified formula that Excel is accepting:
=ISNUMBER(INDEX('SHEET 1'!$G$5:$U$16,MATCH($A$2:$A$13,'SHEET 1'!$A$5:$A$16,0),MATCH($D$1:$R$1,'SHEET 1'!$G$2:$U$2,0)))
Defining the ranges here:
Sheet 1 G5:U16 is the initial time data table
A2:A13 is the [EFH JST] column (the unique key) in the table to be formatted
Sheet 1 A5:A16 is the initial table's JST column
D1:R1 is the header row for the table to be formatted
Sheet 1 G2:U2 is the header row for the initial data table
Any time I drop that formula into the middle of the table it correctly returns true or false, so I know the formula works here. Am I trying to process a formula more complicated than Excel can handle here or am I missing something else?
You can't use table references in the conditional formatting formula ie. [#[EFH JST]]
You can try saving the formula to a named range and then using that
After asking this same question over the the MSDN Technet Forums, the answer that finally fixed the issue was to set the conditional formatting to be =SUMPRODUCT((InitASIPTable=D2)*1)>0. It's not a solid fix as it depends on both tables never having identical values, but it does work.

Resources