I have the following formulas
=IF(AND(C2>35;V2<15%;AA53="");"Groothandel";"")
=IF(AND(C2>35;V2>15%;W2>15%);"Dropshipper";"")
=IF(AND(W2<15%;AA50="");"Private Label";"")
=IF(AND(W2>15%;AA51="");"White Label";"")
I need to combine those into 1 big formula.
Essentially these formulas are here to find out which type of store this is.
I think there also might be an easier way to find out which kind of store it is.
Example file: https://docs.google.com/spreadsheets/d/1HNTdFvN_GW59ojrSgXXZdxgiIj7KBg_eHqkhO_K-QNU/edit#gid=0
try:
=IF(AND(C2>35; V2<15%; AA53=""); "Groothandel";
IF(AND(C2>35; V2>15%; W2>15%); "Dropshipper";
IF(AND(W2<15%; AA50=""); "Private Label";
IF(AND(W2>15%; AA51=""); "White Label"; ))))
Related
could you guys help me with a project. I was able to find a solution for my problem and the formula looks like this:
=IFERROR(VLOOKUP(E4;A8:B13;2;FALSE);0)+IFERROR(VLOOKUP(F4;A8:B13;2;FALSE);0)+IFERROR(VLOOKUP(G4;A8:B13;2;FALSE);0)
I have a category (e.g. Fruits) and need to import a sheet with different kind of fruits and non fruits. I use keywords which define what is a fruit and what not. I need to SUM all values which match to a keyword. My formula works but it will be more and more work when i need to add more keywords.
Are there a better way to realise this?
I build this example sheet for better understanding : )
Spreadsheet link
Thank you in advance : )
use:
=SUMPRODUCT(IFNA(VLOOKUP(E4:G4; A8:B13; 2; )))
you can even use E4:4 or E4:G5 or E4:5
row-wise it would be:
=INDEX(BYROW(E4:G5; LAMBDA(x; SUM(IFNA(VLOOKUP(x; A8:B13; 2; ))))))
use this
=ArrayFormula(SUM( IFERROR( VLOOKUP(E4:G4;A9:B;2;0))))
Usign sumif
=ArrayFormula(SUM(SUMIF(A9:A;"="&E4:G4;B9:B)))
Xlookup
=ArrayFormula(SUM(XLOOKUP(E4:G4;A9:A14;B9:B14;"";1)))
Us XLOOUP instead of IFERROR(VLOOKUP()) can shortens the formula.
=SUMPRODUCT(XLOOKUP($E4:4,$A$9:$A,$B$9:$B,0))
I'd like to run a =SUM(A1:G1), but always skip one column, regardless if it has value or not.
In this case, it should calculate A1+C1+E1+G1.
Is there another function I could append to SUM() or other similar functions as SUM in order to skip one column?
Thank you!
Using the following method you can calculate any number of alternate columns, without the need of manual +
Suppose your data is in second row onwards, use this formula
=SUMPRODUCT(A2:G2, MOD(COLUMN(A2:G2),2))
Simply a sumproduct of cell values and a array of {1,0,1,0,1...}
Another slight variation
=SUMPRODUCT(A2:G2*ISODD(COLUMN(A2:G2)))
But if the even columns contain letters instead of numbers this will give an error, so you can use instead
=SUMPRODUCT(N(+A1:G1)*ISODD(COLUMN(A1:G1)))
Comparing #AnilGoyal's answer, this works as well
=SUMPRODUCT(A1:G1,--ISODD(COLUMN(A1:G1)))
You can use:
=SUM(INDEX(A1:G1,N(IF(1,{1,3,5,7}))))
Or with Excel O365:
=SUM(INDEX(A1:G1,{1,3,5,7}))
A bit more of a general solution:
=SUMPRODUCT(MOD(COLUMN(A1:G1),2)*A1:G1)
Or with Excel O365:
=SUM(MOD(COLUMN(A1:G1),2)*A1:G1)
Or even:
=SUM(INDEX(1:1,SEQUENCE(4,,1,2)))
Since you included Google-Sheets, I'll throw in an option using QUERY():
=SUM(QUERY(TRANSPOSE(1:1),"Select * skipping 2"))
Maybe a bit more verbose, but very understandable IMO.
Consider something of the format:
=SUM(A1:G1)-INDEX(A1:G1,2)
The 2 in the formula means remove the 2nd item in the part of the row. (so the 999 is dropped)
So the formula =SUM(BZ10:ZZ10)-INDEX(BZ10:ZZ10,2) drops CA10 from the sum, etc.(a similar formula can be constructed for columns)
google sheets:
=INDEX(MMULT(N(A1:H3), 1*ISODD(SEQUENCE(COLUMNS(A:H)))))
=INDEX(IF(ISODD(COLUMN(A:H)), TRANSPOSE(MMULT(TRANSPOSE(
IFERROR(A1:H3*ISODD(COLUMN(A:H)), 0)), 1^ROW(A1:A3))), ))
Formulae shown below has been working for me for low number of cells to check:
=if(iserror(match(C1;A1;0));
if(iserror(match(C2;A1;0));
if(iserror(match(C3;A1;0));
if(iserror(match(C4;A1;0));"no matches";D4);D3);D2);D1)
But now I have much more entries in column C that I have to check if they match entry in column A. How can I do this without writing super long formulae using tons of "if's" ?
Please try:
=IFERROR(VLOOKUP(A1,C:D,2,0),"no matches")
If you meant fuzzy vlookup, please try:
=IFERROR(FILTER(D:D,REGEXMATCH(A1,C:C)),"no matches")
As #pnuts mentioned, for your regional settings replace , with ;:
=IFERROR(FILTER(D:D;REGEXMATCH(A1;C:C));"no matches")
Edit for clarity:
The end result that I'm looking for will pass the name picked from the dropdown list in B1 into formulas below to check if each student has completed the training modules listed. The two sheets I'm looking at (for now) are 'Data' and 'Quick Reference' the rest are just placeholders.
I've looked and not found an answer so apologies if this has been asked before!
I'm trying to write a formula that will check form results and if it finds a match, return the contents from another column in that row.
The logical IF function works fine with hard coded entries, but not with cell contents.
So if I'm looking for "Deckhand USS Minnow I" I want to show the contents of Column H. Look on the Data and Quick Reference (Training Progress) tabs to see what I'm talking about.
This works:
=IF(((VLOOKUP($B1,Data!C2:J20,4)="Build Coconut Phone I")),"Yes", "No")
This doesn't:
=IF(((VLOOKUP($B1,Data!C2:J20,4)="Deckhand USS Minnow IV")),Data!H2:H20)
Google spreadsheet
Short answer
Use QUERY() instead of IF(Vlookup(),)
=QUERY(Data!C1:J20,"Select H where F = 'Deckhand USS Minnow IV'",1)
Explanation
While could be possible to use an array formula using IF and VLOOKUP, QUERY() does the work in a direct and simple way.
The formula in the short answer will include the column heading. If you don't want it use
=QUERY(Data!C2:J20,"Select H where F = 'Deckhand USS Minnow IV'",0)
References
QUERY - Google Docs editors Help
I have an importrange("key", "sheet1!D" & targetRow) formula, but I also need the column of the importrange() to be dynamic too in case I add/delete columns in the source data:
E.g. importrange("key", "sheet1!" &targetColumn &targetRow)
I researched query() language but being forced to use Col1, Col2 etc instead of named column identifiers makes this useless for what I'm trying to achieve.
Can someone help me with this? Easiest way to get column letters without a script? Thanks very much.
I've figured out a somewhat inelegant workaround:
=IMPORTRANGE("key", "Sheet!" & IMPORTRANGE("key", "Dept") & targetRow)
Where "Dept" is a single-cell named range that contains the column letter of the column I want.
The column letter (e.g. 'K') is the result of the following formula:
=substitute(address(row(K6), column(K6),4), row(K6),"")
Is there really no easier/more robust way of doing this? This will be used to calculate bonuses so it's actually a very critical spreadsheet.