Highlighting Rows with CF based on cell with sequencial values - excel

I can't seem to nail this down. Using Excel 2010 I've got a column (B) with various 'signals' that each have a sequential number. i.e. 'IP1', IP2', IP3', 'FLOW1', 'FLOW2', 'GV1', 'GV2", and so on... I'm trying to highlight the entire row based on the type of signal (IP, FLOW, GV, etc.) ignoring the sequential value.
Using the CF highlight rule for "text that Contains" only highlights the individual cell. Using this formula to highlight the entire row: =$B2="IP" does not give desired results because all my values have a number as well. I've also tried wildcards: =$B2="IP?" and =$B2="IP*" with no luck.
Is there a way to do this without creating one rule for each sequential signal? I'd even settle for something like this: =$B2="IP1","IP2","IP3" but that doesn't seem to work either. I'm a newby at Excel and know I'm dancing all around the answer here. I don't see this particular problem in other posts...

Conditional formatting formulas you're looking for will either be COUNTIF with wildcards or ISNUMBER(SEARCH(. Personally I prefer the COUNTIF route, but here's both for your perusal:
=COUNTIF($B2,"IP*")>0
=COUNTIF($B2,"FLOW*")>0
=COUNTIF($B2,"GV*")>0
=ISNUMBER(SEARCH("IP",$B2))
=ISNUMBER(SEARCH("FLOW",$B2))
=ISNUMBER(SEARCH("GV",$B2))

Related

Copy data from conditional formatted cells to new tab based on the conditional formatting color in Excel

Okay so I'm new to all this- please help me if there's a better way to do this... currently trying to make changes to an existing spreadsheet and I can't figure out how to accomplish what I want...
Tab 1 accounts for different numbers and their assignments, Tab 2 rearranges that data for a printable page, and Tab 3 has a list of all the numbers we have to account for, and currently uses conditional formatting to do so. (Green if the number is accounted for on Tab 1, Red if not)
What I am trying to accomplish is create a list of all the numbers NOT accounted for (Red conditionally formatted cells on tab 3) to show up in any form on Tab 2. I started messing around with the =mycolor and IF functions, but I found that only works with explicit formatting of the cell, not the conditional formatting I am using to account for the numbers.
Do I need to change how my spreadsheet is accounting for the numbers from Tab 1 instead of conditional formatting? If so what would be the best way to go about this? If there's a way to do this with conditional formatting, how would I go about copying data based on the conditional formatting of certain cells?
Also, ideally I want this to be done without having to play a macro. I'm trying to make this as stupid simple for the end user as possible... but if there's no way to do it without recording a macro then that's what I'll end up doing.
Thanks a bunch in advance...
What I would do is add a column to tab three that is a missing/not missing column (=column C in my mock up below). Missing = 1 accounted for =0. (That can either be achieved by the same formula as used to give the red/green OR a vlookup() function). Therefore for each red row there will be a 1 alongside.
Extending that, as per my comment... index the missing values (col A=):
=IF(C3>0,SUM(C$1:C3),"")
Now use a new pair of columns to grab the missing values
And use a lookup function to line up the missing values (col G)... I only went up to 5 (col f)
=IFERROR(VLOOKUP(F3,A$3:B$6,2,FALSE),"")
THANK YOU for your help Richard!
With some changes, the Vlookup function you gave me (in Column E) worked fine:
=IF(ISERROR(VLOOKUP(E2,hiddenradios,1,FALSE)),"1","0")
And adding the second column(s) and the sum function for values was a really helpful idea: (column H)
=IF(VALUE(F2)>0,SUM(G$2:G2),"")
For whatever reason I couldn't make vlookup work, even with the column relocated to the left of the number I was trying to return, but I was able to do the same thing with an INDEX/MATCH formula in column J:
=IFERROR(INDEX(E$2:E$100,MATCH(I2,H$2:H$100,0),1),"")
Not quite as simple as yours, but you set me on the right path with adding column(s) and I wouldn't have figured it out without your help... thanks again!
enter image description here

How to identify the cells from the sumproduct formula result

I would first like to apologize if this question has already been posted and answered numerous times but I was unable to find the right wording for my question to find a thread that matched.
I have a Sumproduct formula with multiple criteria that helps identify the number of issues I have on the main spread sheet. I got the number of issues, however now I would like to identify the cells meeting this criteria. Is there any way to do this?
To further explain my intention, the main tab on my spread sheet is a report with many different columns that would need to be filtered several different ways each time in order to catch the exceptions we are looking for. I am trying to avoid this manual process by creating a new tab to show these exceptions without having to look for them and leave cause for any user/human error where something could potentially be missed. In a new tab, I used several formulas (like the one below) to determine the number of different exceptions we need to catch, however I am wondering if there is a way to also identify these specific cells that the exceptions fall in so that the user can immediately locate and correct it.
For example: 2 issues identified; B10 and B26. (Or more specifically, if possible, the contents of that given cell?)
Sumproduct:
=SUMPRODUCT(--(May!C2:C452="FHA"),--(May!Z2:Z452<>""),--(May!AB2:AB452<>""),--(May!AC2:AC452=""))
Note: I have also tried to achieve this by using conditional formatting using the formula above, however the issue that I run into with that approach is that the entire row gets highlighted instead of the specific cells matching the criteria from the formula. I am open to a solution with this as well if it is an easier approach.
I hope I am getting across what I am trying to do! Thank you in advance to whomever can help!
Consider adding an additional column to the May worksheet. The new column would contain formulas like:
=(C2="FHA")*(Z2<>"")*(AB2<>"")*(AC2="")
If you AutoFilter on this new column, you will see all the contributors to the SUMPRODUCT() formula.
Your 2 issues identified; B10 and B26 appears to refer to cells that have no bearing on what you seek to achieve so I may have misunderstood but suggest selecting A:AC and applying a CF formula rule of:
=AND($C1="FHA",$Z1<>"",$AB1<>"",$AC1="",OR(COLUMN()=3,COLUMN()=26,COLUMN()=28,COLUMN()=29))

Excel query with regards to IF statements

I have the following formula in an excel sheet that generally works perfectly:
=IF(F5>=30.01,(39+(C5*0.08)),IF(AND(F5>=20.01,F5<=30),(39+(C5*0.07)),IF(AND(F5>=10.01,F5<=20),(39+(C5*0.06)),IF(AND(F5>=5.01,F5<=10),(39+(C5*0.05)),IF(AND(F5>=2.01,F5<=5),(39+(C5*0.04)),IF(AND(F5>=1.01,F5<=2),(39+(C5*0.03)),IF(AND(F5>=0.25,F5<=1),(39+(C5*0.02)),IF(AND(F5>=0,F5<=0.245),(0.03*C5*F5)))))))))
I was just wondering if anyone could tell me how to edit this so that if the result of the formula is less than '43', that the number inputted into the cell should be 43?
I have been trying to edit this accordingly for a while and I'm not sure what I need to do to make that happen.
The rest of the formula works exactly as I need it to, I just need the sheet not to produce a result that is less than 43.
Thank you so much for all your assistance!
You don't need the AND statements as the very nature of the nested ifs picks them off scaling down, Here is your current formula amended:
=IF(F5>=30.01,(39+(C5*0.08)),IF(F5>=20.01,(39+(C5*0.07)),IF(F5>=10.01,(39+(C5*0.06)),IF(F5>=5.01,(39+(C5*0.05)),IF(F5>=2.01,(39+(C5*0.04)),IF(F5>=1.01,(39+(C5*0.03)),IF(F5>=0.25,(39+(C5*0.02)),IF(F5>=0,(0.03*C5*F5)))))))))
You could then wrap it in a MAX formula to get either the result or 43, whichever is larger like so:
=MAX(IF(F5>=30.01,(39+(C5*0.08)),IF(F5>=20.01,(39+(C5*0.07)),IF(F5>=10.01,(39+(C5*0.06)),IF(F5>=5.01,(39+(C5*0.05)),IF(F5>=2.01,(39+(C5*0.04)),IF(F5>=1.01,(39+(C5*0.03)),IF(F5>=0.25,(39+(C5*0.02)),IF(F5>=0,(0.03*C5*F5))))))))),43)
the formula can also be adjusted further in order to group common factors as follows:
=MAX(SUM(IF(F5<=0,0,39),
IF(F5>30,(C5*0.08),
IF(F5>20,(C5*0.07),
IF(F5>10,(C5*0.06),
IF(F5>5,(C5*0.05),
IF(F5>2,(C5*0.04),
IF(F5>1,(C5*0.03),
IF(F5>=0.25,(C5*0.02),
IF(F5>=0,(0.03*C5*F5),0))))))))),43)
Long formulas are always difficult to read, may I suggest to use the Alt+Enter keys combined to start a new line in the same cell thus breaking your formula in several lines within the same cell.
Certainly, The revised formula should be like this:
=IF(F5=0,0,
MAX(SUM(IF(F5<=0,0,39),
IF(F5>30,(C5*0.08),
IF(F5>20,(C5*0.07),
IF(F5>10,(C5*0.06),
IF(F5>5,(C5*0.05),
IF(F5>2,(C5*0.04),
IF(F5>1,(C5*0.03),
IF(F5>=0.25,(C5*0.02),
IF(F5>=0,(0.03*C5*F5),0))))))))),43))

Using SUMIFS with multiple AND OR conditions

I would like to create a succinct Excel formula that SUMS a column based on a set of AND conditions, plus a set of OR conditions.
My Excel table contains the following data and I used defined names for the columns.
Quote_Value (Worksheet!$A:$A) holds an accounting value.
Days_To_Close (Worksheet!$B:$B) contains a formula that results in a number.
Salesman (Worksheet!$C:$C) contains text and is a name.
Quote_Month (Worksheet!$D:$D) contains a formula (=TEXT(Worksheet!$E:$E,"mmm-yy"))to convert a date/time number from another column into a text based month reference.
I want to SUM Quote_Value if Salesman equals JBloggs and Days_To_Close is equal to or less than 90 and Quote_Month is equal to one of the following (Oct-13, Nov-13, or Dec-13).
At the moment, I've got this to work but it includes a lot of repetition, which I don't think I need.
=SUM(SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Oct-13")+SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Nov-13")+SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,"=Dec-13"))
What I'd like to do is something more like the following but I can't work out the correct syntax:
=SUMIFS(Quote_Value,Salesman,"=JBloggs",Days_To_Close,"<=90",Quote_Month,OR(Quote_Month="Oct-13",Quote_Month="Nov-13",Quote_Month="Dec-13"))
That formula doesn't error, it just returns a 0 value. Yet if I manually examine the data, that's not correct. I even tried using TRIM(Quote_Month) to make sure that spaces hadn't crept into the data but the fact that my extended SUM formula works indicates that the data is OK and that it's a syntax issue. Can anybody steer me in the right direction?
You can use SUMIFS like this
=SUM(SUMIFS(Quote_Value,Salesman,"JBloggs",Days_To_Close,"<=90",Quote_Month,{"Oct-13","Nov-13","Dec-13"}))
The SUMIFS function will return an "array" of 3 values (one total each for "Oct-13", "Nov-13" and "Dec-13"), so you need SUM to sum that array and give you the final result.
Be careful with this syntax, you can only have at most two criteria within the formula with "OR" conditions...and if there are two then in one you must separate the criteria with commas, in the other with semi-colons.
If you need more you might use SUMPRODUCT with MATCH, e.g. in your case
=SUMPRODUCT(Quote_Value,(Salesman="JBloggs")*(Days_To_Close<=90)*ISNUMBER(MATCH(Quote_Month,{"Oct-13","Nov-13","Dec-13"},0)))
In that version you can add any number of "OR" criteria using ISNUMBER/MATCH
You can use DSUM, which will be more flexible. Like if you want to change the name of Salesman or the Quote Month, you need not change the formula, but only some criteria cells. Please see the link below for details...Even the criteria can be formula to copied from other sheets
http://office.microsoft.com/en-us/excel-help/dsum-function-HP010342460.aspx?CTT=1
You might consider referencing the actual date/time in the source column for Quote_Month, then you could transform your OR into a couple of ANDs, something like (assuing the date's in something I've chosen to call Quote_Date)
=SUMIFS(Quote_Value,"<=90",Quote_Date,">="&DATE(2013,11,1),Quote_Date,"<="&DATE(2013,12,31),Salesman,"=JBloggs",Days_To_Close)
(I moved the interesting conditions to the front).
This approach works here because that "OR" condition is actually specifying a date range - it might not work in other cases.
Quote_Month (Worksheet!$D:$D) contains a formula (=TEXT(Worksheet!$E:$E,"mmm-yy"))to convert a date/time number from another column into a text based month reference.
You can use OR by adding + in Sumproduct. See this
=SUMPRODUCT((Quote_Value)*(Salesman="JBloggs")*(Days_To_Close<=90)*((Quote_Month="Cond1")+(Quote_Month="Cond2")+(Quote_Month="Cond3")))
ScreenShot
Speed
SUMPRODUCT is faster than SUM arrays, i.e. having {} arrays in the SUM function. SUMIFS is 30% faster than SUMPRODUCT.
{SUM(SUMIFS({}))} vs SUMPRODUCT(SUMIFS({})) both works fine, but SUMPRODUCT feels a bit easier to write without the CTRL-SHIFT-ENTER to create the {}.
Preference
I personally prefer writing SUMPRODUCT(--(ISNUMBER(MATCH(...)))) over SUMPRODUCT(SUMIFS({})) for multiple criteria.
However, if you have a drop-down menu where you want to select specific characteristics or all, SUMPRODUCT(SUMIFS()), is the only way to go. (as for selecting "all", the value should enter in "<>" + "Whatever word you want as long as it's not part of the specific characteristics".
In order to get the formula to work place the cursor inside the formula and press ctr+shift+enter and then it will work!
With the following, it is easy to link the Cell address...
=SUM(SUMIFS(FAGLL03!$I$4:$I$1048576,FAGLL03!$A$4:$A$1048576,">="&INDIRECT("A"&ROW()),FAGLL03!$A$4:$A$1048576,"<="&INDIRECT("B"&ROW()),FAGLL03!$Q$4:$Q$1048576,E$2))
Can use address / substitute / Column functions as required to use Cell addresses in full DYNAMIC.

Filter all unique items like Google Docs

Is there a quick/easy way to filter all unique items in an Excel 2013 column similar to the Google Docs "Unique" function?
This is not a pretty answer, but it works.
Paste this as an array formula into cell B2:
=LOOKUP(2, 1/((COUNTIF(B$1:B1, A:A)=0)*(A:A<>"")), A:A)
With the column that needs to be filtered in A:A
Then drag / copy it down as far as is required.
See it online in Google Spreadsheets
Caveats:
Does not retain original order (resulting order is in fact the reverse)
Does not automatically expand to cover all cells
Not fast, not pretty, not transparent
Footnotes:
It is trivial to use IFERROR() to filter out the #N/A errors, but I've not done this to keep the answer concise
In the same vein the header of the column A is currently also returned. This can be fixed by changing A:A to A$2:$25 in all 3 locations
Original question was for Excel 2013, all of this should work there, but I wrote and tested it in Excel 2016
I would love to hear suggestions on how to make the formula automatically expand down as far as required.
Use the Unique records only feature in Advanced Filter.
Under the DATA tab there is this: "Remove Duplicates". It'll do what you want.
There isn't an equivalent to =unique() in Excel, and I hate having to work without it.
Without =unique() trying to find all of the unique values in a large array of data is impossible. Take a dozen columns of a hundred+ entries and see what the unique values are across the whole mess and pop them nicely into a new columns. I can't figure out how to do it in Excel, but in Gdocs it's simple:
=unique(transpose(split(ArrayFormula(concatenate(A:M&",")),",")))
Using Filters, or PivotTables, or whatever, just doesn't cut it, and I haven't been able to find any hacked together ridiculous excel formula to do anything similar.
filter your data in spreadsheets
This might prove to be of some help to you.

Resources