This question already has an answer here:
To find the lowest supplier who gives the lowest price [duplicate]
(1 answer)
Closed 2 years ago.
I have a sheet that gives the lowest price among two suppliers. the problem is it displays the value only if both barcode comes in the same row. pls help me to expand this equation that where ever matching barcode comes in the sheet must give me the lowest supplier.supplier column ("K") works only if the same barcode comes in same row ("A" & "C") an eg is there ABC213 are not in same row, so "K" doesnt give value. i have applied a formula there. so if u can modify it that would be a great help for me
To get lowest price you can use MIN(), example =MIN(B2, D2) :
For the K2 you already have the formula which works well
=INDEX(A$1:D$1,match(J2,A2:D2,0)-1)
And now you select cells J2 + K2 and just drag down to expand it.
Related
This question already has answers here:
ultimate short custom number formatting - K, M, B, T, etc., Q, D, Googol
(3 answers)
Closed 7 months ago.
I currently have a sheet with numbers displayed in the "K,M,B" format (e.g: 1.2K, 5M, 1.3B).
And I am currently trying to make a function that converts this to the numerical values on a separate sheet.
For example, 1.2k would be displayed as 1200 and so on.
Currently I have:
=SUBSTITUTE(Shorts!B2,"K","")*1000
However, I would also like this SUBSTITUTE functions to handle the case for M (million) and B (billion) so I can drag the cell down the column.
But when I add more multiplications to the nested functions
=SUBSTITUTE(SUBSTITUTE(Shorts!B2,"K","")*1000,("M","")*1000000
it doesn't seem to work and I get a formula parse error.
Any guidance would be much appreciated.
try:
=INDEX(IF(REGEXMATCH(A1:A4&"", "M"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000000,
IF(REGEXMATCH(A1:A4&"", "k"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000,
IF(REGEXMATCH(A1:A4&"", "B"),
REGEXEXTRACT(A1:A4, "\d+.\d+|\d+")*1000000000, A1:A4))))
https://docs.google.com/spreadsheets/d/1lCgHPPXML5Ll9XsrMPXmNnHOEQO0RZP-aWSbMtiCfg4/edit?usp=sharing
My goal here is for sheet 3-5 Checklist to look through Grade 5 and Grade 4 and detect all instances of specific text then return the project name. For example:
C2 on 3-5 Checklist should be searching the sheets Grade 5 and Grade 4 for all instances of the text in B2. C2 should find all these from both the Grade 5 sheet and the Grade 4 sheet:
"5th ELA: Research Based Argument,
5th Robot Week,
5th Typing Program,
5th ELA: Poetry,
5th Science: Web of Life,
4th Typing Curriculum"
The goal is that cells in C & E are using B & D as reference so that if we add a project on the 4th or 5th grade sheets and say a project fits a standard that project will quickly show up on the Checklist sheet.
The real project is bigger but I figure if someone can help me get the basics down I'll be able to apply it larger.
Thank you,
As what MattKing has recommended in the comments, you can use the sheet DB_Idea and just filter the data there (resulting to a more simple filtering).
I tried and compared the result and the only difference is that using DB_Idea sheet includes what grade the project is but removing it via regexreplace should be doable.
Formula (C2):
=ifna(regexreplace(join(char(10),filter(DB_Idea!$B$2:$B,DB_Idea!$A$2:$A=B2)), "Grade \d+: ", ""), "")
Output:
This question already has an answer here:
How to use arrayformula with formulas that do not seem to support arrayformulas?
(1 answer)
Closed 4 months ago.
G'day people,
I am a long time supporter/reader but this is my first time posting on Stackoverflow so please bear with me.
Example of the Sheet I am working in
=if(E2="",,If(maxifs($E:$E,$K:$K,K2)=E2,K2,""))
I am a little stumped on converting this maxifs formula above that I am trying to convert to an arrayformula in Google Sheets. This formula checks to ensure E2 (timestamp) is not blank and then compares then looks all over the timestamp column for a newer timestamp for a distinct identifier (Column K example: '43909Ben Johns' (a CONCAT of a reference number and a client)) to see if there is a new version of that identifier. if it cannot find it, it will populate the row with the latest in column L (where the formula is situated) with the same identifier that is in Column K on the same row. If it does find a newer version it will populate with "".
I tried setting up an arrayformula however I could see that it wouldn't work as I was trying to convert it. It calculated the first row but left all other rows (about 10,000) blank and I suspect that is because it is trying to compare data on E2 and K2 with other rows in column E and K. Below is the array formula I tried:
=arrayformula(if(E2:E="",,If(maxifs(E2:E,K2:K,K2:K)=E2:E,K2:K,"")))
Any help to untangle this would be appreciated and if you need me to explain further, please let me know.
EDIT: Added Sample of Sheet https://docs.google.com/spreadsheets/d/1k1qK2BuYOwDPCtHedg7zV72JmE3_TQYu9EBwZVogQbU/
Kind Regards,
Ben
Here is a formula for you that can be placed in header cell (L1):
={
"Valid Check (Most Recent)";
ARRAYFORMULA(IF(E2:E = "",, IF(E2:E = VLOOKUP(K2:K, SORT({K2:K, E2:E}, 2, False), 2, 0), K2:K, "")))
}
This question already has answers here:
Query is ignoring string (non numeric) value
(2 answers)
Closed 5 months ago.
Here is a copy of my sheet https://docs.google.com/spreadsheets/d/1b7ofD9f02yKiIvGYfCBi_GdhkRtgTAoY2NpftJmZaDQ/edit?usp=sharing
So my query is on the front tab 'Overall' in D1
=query(Data!A1:G,"SELECT * WHERE 1=1 "&IF(A2="All Raids",""," AND A contains "&A2&" ") &IF(B2="All Classes",""," AND LOWER(B) = LOWER('"&B2&"') "),1)
On the datasheet, I have people listen in raids 1,2 and 3.. and it works fine. However, if I were to change a value to something like BWL1 or BWL2, it will not display.
I got this code from a youtube tutorial, so I don't understand it 100%, but basically the "a2=all raids","" part is just to remove any filters, then the remaining is filtered by my drop-down menus, &A2& and &B2&.
Any ideas?
I've tried using A CONTAINS "&A2" instead of A = "&A2&", I just cant figure out a workaround to where any value (numberical+lettered) listed in my Datasheet column A works.
Thank you in advance for your time, I hope this makes sense :)
That's a known issue with query() function: query() has trouble with mixed datatypes (numeric and text in column A). To avoid this you can convert column A to text. See if this formula works
=query({ArrayFormula(to_text(Data!A1:A)), Data!B1:G},"SELECT * WHERE 1=1 "&IF(A2="All Raids","", " AND Col1 contains '"&A2&"'") &IF(B2="All Classes",""," AND LOWER(Col2) = LOWER('"&B2&"') "),1)
Note that, because of the use of 'contains' when '1' is selected in A2, it will also show rows containing BWL1. If you don't want that, change 'contains' to '='.
This question already has an answer here:
Google Sheet SUMIF not summing range
(1 answer)
Closed 3 years ago.
I am making a sheet to oversee funds
I am trying to make something like this in Google Sheets
D(n) = D(n-1) + B(n) - C(n) for the entire row of D
and so on for the entire row
I also would prefer if the remaining fund didn't show up unless a value for received or spent has been input
You can use SUMIF to get running totals of columns B and C, and subtract one from the other:
=ArrayFormula(if((B3:B="")*(C3:C=""),"",sumif(row(A3:A),"<="&row(A3:A),B3:B)-sumif(row(A3:A),"<="&row(A3:A),C3:C)+D2))
try:
=ARRAYFORMULA(IF((B3:B)+(C3:C),
MMULT(TRANSPOSE((ROW(B3:B)<=TRANSPOSE(ROW(B3:B)))*B3:B), SIGN(B3:B))+D2-
MMULT(TRANSPOSE((ROW(C3:C)<=TRANSPOSE(ROW(C3:C)))*C3:C), SIGN(C3:C)), IFERROR(1/0)))