Match text in a row to text in a column - excel-formula

Picture of Excel sheet
Copy of Workbook
I am trying to make a animal compatibility chart for a game. Along the left side and running across the top are the listing of animals. Each animal will have a separate sheet in excel listing which animals they are compatible with. Each sheet will be named the same way as in the column on left. My goal is to have excel search through the appropriate sheet (Named for each animal) and place an X in the cell that intersects with an animal from the top row, thus marking a compatible animal. I have a feeling that index and/or match is the way to go but I am not well versed. Thank You in advanced for any help
Thanks

Well, my comment and based on that, your feeling, were wrong, though it made me laugh, thanks for that :). Enter
=IF(COUNTIF(INDIRECT("'"&RIGHT($A2,LEN($A2)-1)&"'!A1:A1000"),RIGHT(B$1,LEN(B$1)-1))>0,"X","")
in B2 and drag downwards and sideways. You need to get rid of the apostrophes in Bairds Tapir and  Thomsons Gazelle, if you want the function to work on these lines too.
The errors indicate missing sheets.

Related

COUNTIFS ignoring rows based on values in row

I have been struggling with these two problems for the better part of the day. Please see this link to an example: https://docs.google.com/spreadsheets/d/1odU7oqc-WviLzQcghkbYbQG-4DC70-Q_hszb22Chljw/edit?usp=sharing
This is a simplified document I use to see which lecturer (name) has has added which of the 5 documents (on the right) to an online learning environment (one row for each course). The courses can be given in semester 1, 2, or in both. I want to use this document to automatically highlight a name if any of the five boxes on the right is empty if the semester I want to check (Cell D1) is similar to Column E. Furthermore, only the first time a name appears in red, should the e-mail appear so as well.
For this, I of course use conditional formatting (please see those formulas, also pasted in column M (range column C and D) and N (Range column D). N is the white conditional formatting overruling M, in which a N="TRUE" means it is whitened out).
Example 1 (Ans) shows how I intend the programme to work. The first instance shows shows both the name and e-mail in red, later instances do too unless the semester is not similar or all boxes on the right are ticked.
Example 2 (Bertrand) shows the first problem. If the first instance of a red name and e-mail occurs in a semester 'both', the second time the name should be red the e-mail does so as well. This keep occurring until a semester is similar to Cell D1, after which it is normal again.
Example 3 (Carel) shows the second problem. If the first instance in which a certain lecturer occurs all boxes on the right are ticked, the second time he occurs but does not tick all boxes his name shows in red but his e-mail doesn't.
I think problem 1 (example 2) is solved if I can get 'both' to somehow mean both 1 and 2, but I don't know how.
I think problem 2 (example 3) is solved if I can get COUNTIFS to ignore the rows is which all five boxes are ticked.
However, I have no clue how to do this. Is anyone able to help me with either (but ideally both) problems?
Thank you in advance!
I'm not entirely sure, but I think I've understood what you need.
For the first part (where a lecturer has less than all 5 subjects containing 'x' AND where E is either the value of cell D1 or the value of 'both'), try this:
Delete both of your existing conditional formatting rules.
Create a new conditional formatting rule for range = C4:C21 (or perhaps further down your sheet to row 977), with a custom formula of:
=AND(COUNTIF($G4:$K4,"x")<5,or($E4=$D$1,$E4="both"))
The style for the rule should have a red background.
For the second part (updated), this is a bit tricker with conditional formatting but I can offer a solution determined by the value of cells, like you had.
Delete the contents of cells M4:N21 (21 being where you have a formula in the furthest cell).
In cell M4, add the following formula:
=arrayformula(if(iferror(if(ifs(E4:E=$D$1,1,E4:E="both",1)+if(G4:G&H4:H&I4:I&J4:J&K4:K <>"xxxxx",1,)=2,D4:D,),)<>"",countifs(iferror(if(ifs(E4:E=$D$1,1,E4:E="both",1)+if(G4:G&H4:H&I4:I&J4:J&K4:K <>"xxxxx",1,)=2,D4:D,),),iferror(if(ifs(E4:E=$D$1,1,E4:E="both",1)+if(G4:G&H4:H&I4:I&J4:J&K4:K <>"xxxxx",1,)=2,D4:D,),),row($E4:$E),"<="&row($E4:$E))=1,))
It might seem a little complex, but it's done this way to use the functions that are compatible with ARRAYFORMULA so that it will keep working down the sheet as far as you have values in rows.
Now create a new conditional formatting rule for range = D4:D21 (or perhaps further down your sheet to row 977), with a custom formula of:
=$M4=true
The style for the rule should have a red background.

Replace and delete part of a cell text

I have an excel spreadsheet that was exported from some software... it uses code that it understands, which makes sense, but the problem is that the output isn't always best for us humans for a quick visual. Especially when a person isn't accustomed to actually reading it.
Proof in point:
This is in cell column H:
2020-04-01T11:28:18+00:00
Now, I could create an excel formula that replaces every instance manually, but what I want to do is make is to that the T and everything right of is goes the way of the dodo.
I know that there is a substitute command in Excel, but it only would do the first, I forget if there is a way to actually make it so that it will ignore the text to the right, and just take it from the T to 14 steps right and delete it so that all that is left is the Year, day and month. I will use Excel VBA if need be, but I'd rather it be a formula if possible that I can use for a copy and paste in another sheet for readable output.
Thanks in advance.
With data in H1, in I1 enter:
=Left(H1,10)
You don't need to locate the T because its position is fixed.

Formula Error - Pulling seperate column data from initial row match

Currently trying to make a formula that will automatically match a model number from one column and sheet, find it in another sheet and pull the second number from said row and sheet back into the others price field. So far I can get it to match find the model in the 2nd sheet and even get the price.. but it keeps coming back with an error after the formula inside of the MATCH tag is complete.
The first sheet with the model number on the left, the price on the right.
The Second sheets layout
And last where it says its erroring out at
My Formula
=INDEX(A:A,MATCH(TRUE,EXACT(A3,New!A:A)*New!C:C,),4,)
As a side note: I'm extremely new to Excel formulas so this might look sloppy and i could be doing it bad. Just trying to make my life easier with these formulas. Any help is appreciated, even if its just leading me in the right direction. Thank you!
use
=INDEX(New!C:C,MATCH(A3,New!A:A,1))
Or VLOOKUP:
=VLOOKUP(A3,New!A:C,3,FALSE)

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

Excel: Show matching content in cell

A bit of a noob with Excel. I’m trying to help my department by making an assignment front sheet that will insert data based on the selections made.
So far I have created a drop down list that will check for unit number (data validation -> list -> named range), which in turn adds the unit name (index and match named ranges) and shows only available criteria linked to that unit (data validation -> list -> indirect). The problem that I am having is getting the criteria descriptor to show up in the cell next to the chosen criteria.
I don't want to be using VBA or any macros as the staff and IT Techs are paranoid about security. A formula based solution would be great.
It probably makes more sense if you download(updated link) my spreadsheet.
Thanks
AC
I Think your actually looking for this
=INDEX(Unit1_Criteria_Descriptor,MATCH($C17,INDIRECT(SUBSTITUTE($J$7," ",""),0)))
Your unit in C17 has a space "Unit 2" so i am using SUBSTITUTE to remove before i pass it to INDIRECT so that the MATCH is looking up the right column
If I've understood the data in your sheet correctly, you can use a VLOOKUP
In Cell D17: =IF(ISBLANK(C17)=FALSE,VLOOKUP(C17,Data!$L$2:$M$14,2,FALSE))
In Cell D18: =IF(ISBLANK(C18)=FALSE,VLOOKUP(C18,Data!$L$2:$M$14,2,FALSE))
In Cell D19: =IF(ISBLANK(C19)=FALSE,VLOOKUP(C19,Data!$L$2:$M$14,2,FALSE))
etc.. for as many rows you have.
I'm not sure if the extra columns are meant to be populated too using the data in your data sheet, but its fairly simple to adjust the VLOOKUP to do this.
Update
My code above doesn't work as I didn't look at the validation stuff. I've edited your example work book, and it should now display the correct details.
The colours in the data sheet are just to show the name'd ranges I've used.
https://dl.dropboxusercontent.com/u/10316127/2015-Assignment_.xlsx

Resources