Sheets - Max value from lookup column - google-sheets

Using Google Sheets, I have a reference sheet with names along the Header and 3 values below each.
On the primary sheet, I want to have a name input in cell B8 and a formula in C12 to take that name and lookup in sheet 'Range' for the 3 values but return the highest value of the 3.
Here is the shared sheet: HighValueTest google sheet
Once I have that value (between 1 and 5) I want to highlight a column of cells representing the count of that value.
Any help greatly appreciated!

Here's a formula to copy it down for that max values of your heroes:
=MAX(INDEX(Range!$B$2:$4, 0, MATCH(B8, Range!$B$1:$1, 0)))
And here is the formula for conditional formatting for that indicator rows (apply to the range B2:B6):
=MAX($C$21:$C$23) >= (5 - ROW() + ROW($B$2))
$C$21:$C$23 here is just the range where we've put our max values before.

Related

Google Sheet ISBETWEEN doesn't recognize named range?

Column A is named "Quantity", which works in a simple formula:
I'm getting an error when attempting to use a named range in ISBETWEEN formula:
I verified that ISBETWEEN works when I use cell reference A2 instead of named range Quantity:
Any thoughts how I can fix? šŸ˜¤
Your named range Quantity has its range set to A1:A but you are entering it in row 2, so error says there is no room in A2:A for A1:A unless you add a row but when you do it's the same coz you can't fit 3 keys into 2 keyholes (from one side each of course)
As seen on this sample:
See my comment to your original post.
Assuming that your named range Quantity is applied to the entire range A:A (and not A2:A), delete everything from Col B (including the header) and then place the following formula in cell B1:
=ArrayFormula( {"Test"; IF(A2:A="",, ISBETWEEN( FILTER(Quantity, ROW(Quantity)>1), 1, 5) ) } )
This one formula will create the header text (which you can change within the formula if you like) and all results for all valid, non-null rows.
FILTER(Quantity, ROW(Quantity)>1) is necessary to limit the full range of the named range Quantity to only those elements whose row is greater than (row) 1; this is because your results begin in Row 2.
You only need this one formula. As you add more data into Col A, the formula will process it.

Apply conditional formatting for entire sheet based on the lookup values

I have 2 sheets. The first one has 2 columns:
A:A - sequential numbers from 1 to 100
B:B - 1-5 value for each number in A
Another sheet has matrix 10x10 from 1 to 100 where I would like to make conditional formatting by defining by the value from Sheet1!B. For example on the Sheet2 there will be number 55. Then I need to go Sheet1, find value 55 in column A and then based on the value in column B decide what formatting to apply.
=VLOOKUP(D2, INDIRECT("Sheet2!A:B"), 2, 0)=5

Import vlookup data from a seperate Google sheet

I have a g-sheet and need to link cells from a imported g-sheet while using the vlookup formula. However, I canā€™t get it to work...
This is my formula:
=vlookup($A781,IMPORTRANGE("(link: https://docs.google.com/spreadsheets/d/1migJfXvK29d2bUm0pgZQQco-dOlAoNzfVoCrjIJ--uY/edit#gid=1509040177) docs.google.com/spreadsheets/dā€¦",'SDC & MVC'!$A$1:$G,4,false))
This is my error message:
Wrong number of arguments to VLOOKUP. Expected between 3 and 4
arguments, but got 2 arguments
Any suggestions? What am I doing wrong?
The vlookup function takes 3 or 4 arguments and you have only provided two. I think you might need a closing parentheses ) on the IMPORTRANGE earlier before SDC & MVC'!$A$1:$G.
Try:
=vlookup($A781,IMPORTRANGE("(link: https://docs.google.com/spreadsheets/d/1migJfXvK29d2bUm0pgZQQco-dOlAoNzfVoCrjIJ--uY/edit#gid=1509040177) docs.google.com/spreadsheets/dā€¦"),'SDC & MVC'!$A$1:$G,4,false)
Argments are as follows:
Search_key - is the value to search for (lookup value or unique
identifier). For example, you can search for the word "apple", number
10, or the value in cell A2.
Range - two or more columns of data for the search. The Google Sheets
VLOOKUP function always searches in the first column of range.
Index - the column number in range from which a matching value (value in the same row as search_key) should be returned.
The first column in range has index 1. If index is less than 1, a Vlookup formula returns the #VALUE! error. If it's greater than the
number of columns in range, VLOOKUP returns the #REF! error.
Is_sorted - indicates whether your Vlookup formula should return the
nearest match (TRUE) or exact match (FALSE).
Source: https://www.ablebits.com/office-addins-blog/2017/07/05/vlookup-google-sheets-example/
correct syntax would be:
=VLOOKUP(A781,
IMPORTRANGE("1migJfXvK29d2bUm0pgZQQco-dOlAoNzfVoCrjIJ--uY", "SDC & MVC!A1:G"), 4, 0)
eg: find value of cell A781 in spreadsheet with ID 1migJfXvK29d2bUm0pgZQQco-dOlAoNzfVoCrjIJ--uY in sheet called SDC & MVC in column A ...and if match is found return adjacent value from column D (4th column)

Google Sheet - Conditional Formatting for MAX value per row

I have a spreadsheet for a game that I play (EvE Online), and this is the table I use:
I'd like to know how can I make conditional formatting to highlight the MAX value comparing columns I (corp total) and column M (market total) for each line, my goal is to have these values highlighted as an example:
=QUERY(TRANSPOSE(QUERY(TRANSPOSE($I1:M),"select
"&REGEXREPLACE(JOIN(,ARRAYFORMULA(IF(LEN(I1:I),"max(Col"&ROW(I1:I)-
ROW(I1)+1&"),",""))),".\z",""))),"select Col2")

Sum values based on row value and column header

We have a Google Sheet doc which contains a date column with each date as a row value, and also multiple columns (some of which have the same name) and we want to sum the values in the cells where the row is a specific date, and the column has a specific header. For example where the date is 01/03/2017 we want to sum all the values which have the column header "X" on that date. Can this be done?
Yes it can be done
=SUMIF($C$3:$J$3,"X",OFFSET(C3:J3,MATCH(B1,B4:B15,0)+3,0))
Broken down
=sumif($C$3:$J$3 [<-header row with X],"X" [<-what we're looking for],C3:J3 [<-row to sum])
the formula above will sum the header row if there is an "X" (not very useful)
I used offset(C3:J3,[row number],0) with the header row range to push it down to the row matching 01/03/2017
To get the row number of 01/03/2017 I used Match() and put 01/02/2017 in cell B1
MATCH(B1,B4:B15 [range of dates] ,0)
I add 3 becuase my range starts at 4
You can hard code the date into the formula by replacing B1 with
DATEVALUE("01/03/2017")
I've not tried this in Google Sheets as I don't have access at the moment but it works in Excel and I'll try it in Sheets later.
Here's the formula that you can paste into A2 on your sheet "Sum of Data"
=SUMIF(Data!$B$1:$J$1,B$1,OFFSET(Data!$B$1:$J$1,MATCH($A2,Data!$A$2:$A,0),0))
It's all about changing the original formula to match your data and also locking the ranges correctly with the $ so that it will autofill down and across without breaking.
Use INDEX to peel off the appropriate column for SUMIF.
=SUMIF(A:A, G4, INDEX(A:E, 0, MATCH(H4, 1:1, 0)))
Considering a sheet where:
Cell B1 contains the date of interest (e.g. 01/03/2017)
Cell B2 contains the header of interest (e.g. X)
Cell B3 returns the sum of interest (values of all columns with header "X" on 01/03/2017)
Row 4 contains the headers to be evaluated (e.g. "Date", "A", "B", "X", "C", "X", "D")
Subsequent rows contain the actual data (e.g. dates in column A and data in columns B:G)
Refer to the image on the link below for details:
Example with cells of interest highlighted in yellow
The following formula should return the expected result:
=SUMIF(4:4,B2,INDEX(A:G,MATCH(B1,A:A,0),0))
I used Google Sheets in Portuguese. So, the formula actually tested was:
=SOMASE(4:4;B2;ƍNDICE(A:G;CORRESP(B1;A:A;0);0))
I hope that was usefeul.

Resources