[Solved] What formula use with INDEX/MATCH?

Discuss the spreadsheet application
Post Reply
Olegs Andrejevskis
Posts: 3
Joined: Fri Apr 02, 2021 10:14 am

[Solved] What formula use with INDEX/MATCH?

Post by Olegs Andrejevskis »

I'm self employed furniture designer. I design a furnitures in 3D software, from where I can get material list (Green). I need some formula to find exact furniture piece by name and extract information from material price list (Red) depending on measurements of this piece. I have already found the INDEX/MATCH formula. But I need a formula that looks at the part name in the correct table. As far as I understand - the VLOOKUP formula will not work here. The list of materials from the 3D software (Green) can also be with more parts with different sizes and quantities.
Attachments
Prices formula.ods
(19.7 KiB) Downloaded 118 times
Last edited by Olegs Andrejevskis on Sun Apr 11, 2021 3:53 pm, edited 2 times in total.
OpenOffice 3.4.1 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: What formula use with INDEX/MATCH?

Post by Villeroy »

Your data layout is not suitable to be processed easily by any kind of computer program.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: What formula use with INDEX/MATCH?

Post by Villeroy »

Anyway. It is just a matter of time that something will get out of sync with this layout.
Attachments
Prices formula_1.ods
(23.58 KiB) Downloaded 116 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Olegs Andrejevskis
Posts: 3
Joined: Fri Apr 02, 2021 10:14 am

Re: What formula use with INDEX/MATCH?

Post by Olegs Andrejevskis »

Villeroy wrote:Anyway. It is just a matter of time that something will get out of sync with this layout.
Thank you, Villeroy!
Maybe there is some much better way to layout information from catalog? I can get dimensions and quantities of the panels from 3D software to spreadsheet. I want, somehow, calculate project price with formulas, so I don't have to do it with every detail manually. I add example from price catalog.
Prices from catalog-SHT.JPG
Prices from catalog-SHB.JPG
OpenOffice 3.4.1 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: What formula use with INDEX/MATCH?

Post by Villeroy »

I don't know anything about your 3D software, how it stores and exports data and why it can't calculate the prices. With the current layout there is one thing you have to fix:

Having 2 columns:
230 39,6
331 49,14
491 56,74
=INDEX(col_2; MATCH(300;col_1)) returns 230
=INDEX(col_2; MATCH(200;col_1)) returns #NA because 200 is smaller than the smallest value 230.
MATCH does not match "up to 230". MATCH matches "230 or higher", "331 or higher", "491 or higher"

Your 2 columns may look like:
1 39,6
231 49,14
332 56,74
Now the formula returns
39,6 for 1 to 230
49,14 for 231 to 331
56,74 for anything above 331
 Edit: I may be wrong. You are the one who knows the right match. But you should be aware how MATCH works 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
MrProgrammer
Moderator
Posts: 4908
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: What formula use with INDEX/MATCH?

Post by MrProgrammer »

Hi, and welcome to the forum.
Villeroy wrote:Your data layout is not suitable to be processed easily by any kind of computer program.
Agreed. If you intend to use Calc, you will want to arrange your data so that you can use Calc's features. Your 3D data layout (6 by 4 by 4) will be difficult to use in formulas.
Olegs Andrejevskis wrote:Maybe there is some much better way to layout information from catalog?
If the information is entered as one table, the price can be obtained with SUMPRODUCT. The approach used here depends on each name having the same (nine) number of prices. If the sizes vary for different names, a different layout (Name, MinL, MaxL, MinD, MaxD, Price) is needed. The six-column layout would be easier to work with, needing more columns but fewer rows. However, I used the layout here just to experiment with the idea and because that's how the data in your first post is arranged. These are the 16 table entries for BK; the rows for the other five names immediately follow them. The table has 97 rows, one for the header and 96 (6 times 4 times 4) data rows. Sorry, Villeroy, this data is not in normal form but Calc doesn't mind.
Normalized.png
202104021625.ods
(22.97 KiB) Downloaded 105 times
[Tutorial] The SUMPRODUCT function, example X16

I began working on my spreadsheet this morning and it is based on your MATCH formulas, which I see now might be incorrect since MATCH looks for EQUAL OR GREATER not UP TO. But the SUMPRODUCT operands can be changed for that.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply