I'm trying to do something which should be fairly trivial in Google Spreadsheet: I have a database of people in one sheet defined by "ID" and "Label" where the ID is a consecutive number and Label is the Name Surname of each person.
I'd need to be able, in a different sheet, to allow my team to type in the "Label" of a person and have the adjacent cell to show up the corresponding ID.
Given that sheet 1 is something like:
ID Label
01 Alice Johnson
02 Bert Junger
03 Carlos Lopez
I would like that in sheet 2 would happen something like:
person = raw_input()
if(person == exist in sheet 1):
get person's col and row from sheet 1
return value(person's col-1, person's row)
Ideally, I'm looking to do this only with google spreadsheets formulae, since it would be otherwise hard for my colleagues to be able to work on it.
Thank you so much everyone!
You could do this with an Index Match formula or V Lookup.. Have a look at this spreadsheet.
Related
Say I have a column with Text data like:
A
B
A
D
I would like to create a new column so that the end result is:
A 0
B 1
A 0
D 2
What is the correct way do this is PowerBI Power Query Editor? I tried a few things like indexing but that gives a unique value to every row. Not very familiar with the API so am a bit stuck here.
We can do something like: List.PositionOf(List.Distinct(Table.Column( #"Table name", "Col")), [Col]))
where Col is the column name.
so I have been working on automating this table for the most performing person of the week on google sheets.
now on the column O i have top candidate, I want to run an if statement that would check through the values of each person. for example, for day 1 it would check from K3 to N3 once it gets the value, it should post the name of the candidate. That means for week 1, day 1, it would check and see that charles has the top performance and post "Charles" on the top candidate cell of the same row.
so far i know how to know ts easy getting the number between the cells which has the biggest value =max(K3:N3) but then combining it with an if statement that would know the cell on top... that got me worked up and still not found an answer
This formula should work:
=INDEX($K$2:N,1,MATCH(MAX($K3:$N3),$K3:$N3,0))
MATCH will find a specific column that has the max value of K3:N3, then INDEX will reference the value of the top column.
Sample Sheet:
use:
=ARRAYFORMULA(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IFNA(
IF(IF(K3:N="", "x", K3:N)=QUERY(TRANSPOSE(QUERY(TRANSPOSE(K3:N),
"select "&TEXTJOIN(",", 1, IF(LEN(J3:J),
"max(Col"&ROW(A3:A)-ROW(A3)+1&")", ))&"")),
"select Col2"), K2:N2, ))),,9^9))))
I have a spreadsheet where a user will fill out a form which then outputs onto a google sheet with a timestamp. This is then concatenated with their name to get an input ID.
I have column A with the input ID and column B with the name of the person who is supposed to be in the columnID.
For example:
Column A: 11/11/11Bob Smith
Column B: Bob Smith
I would like to highlight any cell in column A that does not contain the contents of column B. There is a large amount of content in column B that changes on a weekly basis so it would not be worth the time to go through and set conditional formatting for each cell.
try:
=NOT(REGEXMATCH(A1, TEXTJOIN("|", 1, B:B)))*(A1<>"")
You can add conditional formatting to a whole range.
If data in column A should contain text of column B of the same row, this can be done with:
=not(REGEXMATCH(A1, B1))
I have a file that needs to look up the team name (on a tab called "Parse") of an employee on a tab called "Roster". This can be done with a simple array Vlookup, however, the issue is that each week, we add a row to the Roster tab because employees sometimes move around.
I have already done the majority of legwork by using a MAX/FILTER/COLUMN, LEN formula to determine what the last column is in the Roster tab. I have also created a range that will provide me with the actual range needed for the VLookup. For example: If the last column in Roster is "G", I already have a formula that populates "'Roster'!A2:G", which is the range I would need for my Vlookup. If the last row in Roster is "P", then the formula shows "'Roster'!A2:P".
The formula that gives me the range, as I described in the examples, lives in cell F2 on the Parse tab.
So the hard part is done. All I need to know now is, when writing my Vlookup, how can I have the formula reference the actual contents of cell F2 in the Parse tab instead of thinking the lookup range is cell F2. Here's a visual:
Cell F2 in the Parse tab reads: 'Roster'!A2:G (because as of now, column G is the last column with data. this is correct).
My VLookup is VLOOKUP($A2,$F$2,7,FALSE). However, I want my Vlookup to say VLOOKUP($A2,'Roster'!A2:G,7,FALSE).
Is it possible to have the formula reference what is IN cell F2 instead of referencing just "F2"?
I hope this made sense. It's the end of my workday and I'm very tired.
try something like:
=VLOOKUP(A2, INDIRECT("Roster!A2:"&
SUBSTITUTE(ADDRESS(1, MAX(IF(Roster!1:1<>"", COLUMN(Roster!1:1), )), 4), 1, )),
MAX(IF(Roster!1:1<>"", COLUMN(Roster!1:1), )), 0)
my spreadsheet link with edit authorized - feel free to test any formula
https://docs.google.com/spreadsheets/d/1iY0p3_mdOfrjtBy9HPskzudf27m1mh_hApecsn0KW4A/edit#gid=1268421551
please look at the country that has statename such as P26-P38
I have 2 sheets - one is main sheet and another is named 'articles'
MAIN SHEET
ARTICLES
MAIN SHEET > on column P > I need to show the maximum date value located in column 'F' [articles!F:F]
from 'articles' sheet by finding any rows on column 'B' of 'articles' [articles!B:B]
that contains the number from column 'M' of 'Main sheet' [main!M:M]
so I use this formula
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M58&","))))
and its working fine
but then I also need to find state name which is located in 'column E of articles'[articles!E:E]
like in the screenshot above I need to find 'Alberta' for Canada
as you can see the state name will come after '-' and follow by ':'
So it need to match both conditions and return the date
I don't know how can I define it in the formula 'regexmatch' and combine it together with the formula that I already have
I tried this but doesn't work
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M58&","),articles!E:E,"-"&"
"&K58&":")
anyone please help, thanks
See if this works
=IFERROR(MAX(filter(articles!F:F,regexmatch(articles!B:B&articles!E:E, M59&K58&":"))))
If not, please share a copy of your spreadsheet with editing rights.
EDIT: after seeing the data, try (e.g. in P26)
=IFERROR(MAX(filter(articles!F:F,regexmatch(","&articles!B:B,","&M26&","), regexmatch(articles!E:E,K26))))
Drag up or down as far as needed.