So I have a file of the form above. The hyperlinks you see in row 2 are suppliers. Under each supplier there is the cost for the EAN in that row (EAN is in column A). I am trying to return in column B the minimum price + the supplier that is offering that. How can I do this?
So far I have just done min(rowX) to get the minimum price (as you can see in column B), next I imagine I can use ampersand to concatenate this to the supplier in question but not sure how to use "offset" (or otherwise) to get the supplier? For example, in column B, the first entry should become:
"11.77 - FennixBrokers"
This is in reference to the fact that the minimum price offered by any supplier for this EAN is 11.77 and in this case that happens to be an offer from FennixBrokers.
try:
=BYROW(C3:Z,LAMBDA(z,IF(COUNTA(z)=0,,MIN(z)&" - "&FILTER(C2:Z2,z=MIN(z)))))
Related
I'm trying to work out a function in a Google Sheets cells to look at a column then search current row and "above" the current row to find a non number value (text).
I have data that in two columns B (item code or category) & C (item description).
I need another column to contain the categories for each item - column D. I'm looking for a formula for this column, ideally an Arrayformula as the data can change, there can be multiple items per category, some might be only 1 item, some might be 100 items per category. The arrayformula in column D will get the category from column B if it is not a number.
B column - categories and item codes, C column - item descriptions, target is D column a copy of the categories from column B.
I've tried this numerous times and usually give up, do it manually but it becomes teadious quickly. Looking forward to any help that might come from this! thanks.
In D2 try
=Arrayformula(if(isnumber(B2:B), vlookup(row(B2:B), filter({row(B2:B) , B2:B}, istext(B2:B)), 2), B2:B))
and see if that works?
Try in D1
={"Category";ArrayFormula(lookup(row(B2:B),row(B2:B)/if(isnumber(B2:B),0,1),B2:B))}
I have 10 columns with price data in.
Column A has my product SKU
Column B - has the cost price of a product
The other columns have other prices in them.
Link: https://docs.google.com/spreadsheets/d/17PLI_d_05uYnzOt2yL4ZQA3XB89rIz9vQJnIOBidMz8/edit?usp=sharing
I want to go through each cell in a row and see if any of the prices listed are less than, or equal to, the cost price in Cell A.
How would I write this in Google Sheets?
I believe the correct way to do this is the following formula:
=$D2:$K2<=$B2
To check if there is any price below (or equal) to a certain value, you could check the minimum price and compare that. So use the MIN function and compare that with the value at B2.
=MIN(D2:K2)<= B2
You have posted a solution but you are comparing a range with a value, and for me it does not work.
I'm trying to make a spreadsheet to find the best price of a product in Google Sheets. I have the product description on B column, starting from the sixth row and below, the prices are on column E6 and on, (F6, G6, H6,...) Each supplier name is written on the fist row of their Columns. The lowest price is in column C and Column D displays the supplier with that price.
I've tried the min() function, but there's an issue, I need it to bypass 0 values.
On column C, I'm using this code =min($E6:$Z6) and for displaying the supplier I'm using =index($E$1:$Z$1,0,match(min($E6:$Z6),$E6:$Z6,0))
I'll add a screenshot of the problem.
wrap it into simple IF or IFERROR
=IF(MIN($E6:$Z6)=0, , MIN($E6:$Z6))
and the second one:
=IFERROR(INDEX($E$1:$Z$1, 0, MATCH(MIN($E6:$Z6), $E6:$Z6, 0)))
I have two columns in a Google spreadsheet. One column ("amountPaidByBuyer" or column "G") contains the amount buyer paid for product. The second column ("cost" or column "J") contains the amount our company paid for the product. I have a 3rd column ("ROI") which should contain the difference between the cost and the amount paid by buyer (for example, if cost is 10.99 and the buyer paid 11.99 then the ROI is +1.00. If the cost is 10.99 and the buyer paid 9.99 then the ROI is -1.00).
Since I'm simply subtracting two columns from the same row (G - J) I tried inserting the following formula:
=MINUS(G ROW(),J ROW())
This was done based on the following answer which suggests using the ROW() function to get the current row automatically (instead of needing to specify this value in the formula).
However, this leads to the following error: Formula parse error.
Google does not provide any additional details about the error.
What is wrong with the formula?
If you want to use minus and row(), this will work:
=minus(indirect("G"&ROW()),INDIRECT("J"&ROW()))
But why not use:
=G2-J2
Change the row to where you start then drag the formula down for rows below.
What’s wrong with the formula is too much for Sheets’ help features to cope with:
i. MINUS requires numeric parameters and G ROW() is not numeric.
ii. G ROW() is merely a string of characters, including a space. In Excel, for example, a space may be an intersect operator – but space does not function as such here. (Even with the update a few minutes ago Sheets does not have an intersect operator.)
iii. To combine a column reference with a row reference to make a cell reference concatenation is required (eg use of & operator).
iv. But G&ROW() does not work because Sheets does not recognise G as a column name, without quotes round the G (unless a column has been given the range name of G).
v. "G"&ROW() returns a cell reference, but not the value in that cell, so not the numeric parameter required by MINUS.
vi. To interpret the cell reference as the value within the cell a function like INDIRECT is required.
I wondered if someone could help me with what I hope is a simple Formula.
I have a simple spreadsheet for Product which has a column for the product name eg
Product A
Product B
Product C
Product D
Now on each row there are some numerical values
eg
Product
Product A 5.0 2.5
Product B 6.0
Product C 2.0 4.0 5.0
Product D 3.0
Product E 6.0 2.0 1.6 2.9
Now what I want is to have a formula for a Column next to the prouct that shows me the value of the last entered value for a Product eg
the Values in the above example would give me
Product A 2.5
Product B 6.0
Product C 5.0
Product D 3.0
Product E 2.9
In Excel I would do this with INDEX and MATCH however I cannot get this to work in Google Spreadsheets.
Any ideas would be most welcome.
Here is a screenshot of what I would like it to look like.
http://i.imgur.com/jqcNW.png
Many thanks in advance
For me this one works better, mainly because it works with any other formulas in the same row:
=LOOKUP(9999999999; (B2:G2))
I managed to do it :)
Formula
=index(B2:G2;1;counta(B2:G2))
Will update #mik's answer once I have a high enough reputation.
As a more general answer than #mik's, you can have a formula that slides with the placement of the data:
=index(B2:G2, 0, max(ARRAYFORMULA(column(B2:G2)*(B2:G2<>""))) - column(B2) + 1)
I used a similar solution to #DannyhelMont, but I adapted it to work with strings. I had to fill the first column in the range with values to keep from getting an error.
The string of z's is intended to appear alphabetically later than every other possible string. The hlookup function returns the last value which is less than or equal to the search value. (If you're doing numbers, use 9999999999 instead of the z's.)
=HLOOKUP("zzzzzzzzzz",B2:G2,1,true)
This has an advantage over the index/counta solution given by #DarkUFO because it doesn't depend on the number of cells with values. If any cell in the range is empty, counta returns a number less than the offset of the last cell. The hlookup solution can have empty cells. If all cells are empty it gives an error.
If you can have both numbers and strings, or do not know a value that is greater than any possible number or string, you can do:
=index(B2:G2,1,max(arrayformula(column(B2:G2)*(B2:G2<>"")-1)))
This will return the value of the 1st column and last row of a range named RangeName:
=INDEX(RangeName, ROWS(RangeName), 1)
where RangeName is the name or range you are looking at. ROWS returns the number of rows in that range.