SOLVED

Weight cost formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1071615%22%20slang%3D%22en-US%22%3EWeight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1071615%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20help%20to%20create%20a%20formula%20that%20must%20spit%20out%20a%20price%20after%20taking%20weight%20into%20consideration.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20know%20how%20to%20produce%20this%20formula%20and%20would%20appreciate%20some%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20attach%20the%20file%20and%20you%20can%20see%20what%20is%20needed.%20Can%20some%20good%20expert%20help%20with%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3Emaybe%20%3CLI-EMOJI%20id%3D%22lia_slightly-smiling-face%22%20title%3D%22%3Aslightly_smiling_face%3A%22%3E%3C%2FLI-EMOJI%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1071615%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1072198%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1072198%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264624%22%20target%3D%22_blank%22%3E%40ClauP%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20attached%20and%20see%20if%20this%20answers%20your%20question.%20The%20shaded%20areas%20is%20what%20i%20added.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073671%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073671%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENo%20this%20doesn't%20answer%20the%20question.%20I%20need%20a%20formula%20that%20should%20be%20in%20the%20Total%20selling%20price%20column%20and%20take%20the%20transport%20fee%20and%20weight%20into%20consideration.%20Like%20C4%20%3D%20D4%2BE4(transport%20fee)%20when%20weight%20is%201-1000.%3C%2FP%3E%3CP%3EC5%20%3D%20D5%2BE5(transport%20fee)%20when%20weight%20is%201000-2000%20and%20so%20on...%3C%2FP%3E%3CP%3EHow%20can%20this%20be%20done%3F%3F%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073708%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073708%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264624%22%20target%3D%22_blank%22%3E%40ClauP%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3ESorry%2C%20but%20I%20don't%20get%20it.%20Assuming%20you%20don't%20just%20want%20to%20enter%20%3DD4%2BE4%20in%20cell%20C4.%20Thought%20you%20wanted%20to%20calculate%20the%20total%20price%20as%2010%20plus%20the%20transportation%20cost%20depending%20on%20the%26nbsp%3B%3C%2FFONT%3Eweight%3CFONT%20face%3D%22inherit%22%3E.%20That%20would%20make%20perfect%20sense.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3ECould%20you%20otherwise%20indicate%20what%20outcome%20you%20want%20to%20see%20in%20numbers.%20Then.%20I'm%20sure%20we%20can%20create%20a%20formula%20for%20you.%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073729%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073729%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYes%20you%20are%20correct.%20%22%3CFONT%20face%3D%22inherit%22%3EThought%20you%20wanted%20to%20calculate%20the%20total%20price%20as%2010%20plus%20the%20transportation%20cost%20depending%20on%20the%26nbsp%3B%3C%2FFONT%3E%3CSPAN%3Eweight%3C%2FSPAN%3E%3CFONT%20face%3D%22inherit%22%3E.%20That%20would%20make%20perfect%20sense.%22%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3EI%20want%20to%20calculate%20total%20price%20as%2010%20plus%26nbsp%3Bthe%20transportation%20cost%20depending%20on%20the%26nbsp%3B%3CSPAN%3Eweight.%20I%20set%20C4%20just%20so%20people%20understands%20where%20to%20put%20the%20%22%3D%22.%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CFONT%20face%3D%22inherit%22%3E%3CSPAN%3EDo%20you%20understand%20what%20I%20want%20now%3F%3C%2FSPAN%3E%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073770%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073770%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264624%22%20target%3D%22_blank%22%3E%40ClauP%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMy%20suggested%20solution%20did%20precisely%20that%2C%20I%20thought.%20The%20examples%20I%20gave%20were%20merely%20to%20demonstrate%20how%20to%20use%20the%20VLOOKUP%20function.%20For%20instance%2C%20when%20a%20package%20weighs%203250%20grams%20the%20transportation%20cost%20is%2042.50%20(from%20the%203000-4200%20weight%20group).%20But%2C%20for%20the%20VLOOKUP%20function%20to%20work%20I%20created%20an%20extra%20column%20that%20has%20the%20lower%20boundary%20of%20the%20weight%20groups%20as%20a%20number%2C%20as%20the%20function%20can%20not%20determine%20that%20the%20weight%203250%20(being%20a%20number)%20falls%20in%20the%20group%20%223000-4200%22%20being%20a%20text.%20the%20formula%20in%20D4%20(my%20schedule)%20is%26nbsp%3B%3DVLOOKUP(B4%2CG4%3AH12%2C2)%20finds%20the%20correct%20transport%20cost%20in%20the%20range%20G4%3AH12%20based%20on%20the%20weight%20in%20B4.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073808%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073808%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMmm%2C%20I%20understand%20but%20it%20is%20not%20a%20complete%20solution%20how%20I%20see%20it.%20There%20are%20now%20two%20tables%20and%20you%20put%20the%20formula%20of%20Vlookup%20in%20the%20transport%20column.%20I%20want%20a%20single%20solution%20using%20one%20table%20and%20one%20column%20with%20focus%20on%20the%20column%20with%20total%20selling%20price.%20To%20me%20the%20Vlookup%20doenst%20quit%20fix%20it.%20Any%20other%20suggestions%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20maybe%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3Bhelp%20as%20well%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1073972%22%20slang%3D%22en-US%22%3ERe%3A%20Weight%20cost%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1073972%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F264624%22%20target%3D%22_blank%22%3E%40ClauP%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20my%20point%20of%20view%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3Bgave%20right%20solution%2C%20it's%20better%20to%20keep%20transportation%20fee%20depends%20on%20weight%20in%20helper%20cells.%20From%20maintenance%20point%20of%20view%20that's%20much%20easier%2C%20any%20correction%20could%20be%20done%20in%20one%20place%20only%2C%20not%20in%20each%20formula.%3C%2FP%3E%0A%3CP%3EBut%20if%20you%20what%20to%20hardcode%20it%20that%20could%20be%20like%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DD14%2BLOOKUP(B14%2C%7B0%2C1000%2C2000%2C3000%2C4200%2C15000%2C19000%2C40000%2C60000%7D%2C%7B22.5%2C41.25%2C41.25%2C42.5%2C45.75%2C46.5%2C71.5%2C85.5%2C85.5%7D)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eor%2C%20if%20to%20use%20only%20your%20range%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3DD15%2BLOOKUP(B15%2C--LEFT(%24F%244%3A%24F%2412%2CSEARCH(%22-%22%2C%24F%244%3A%24F%2412)-1)%2C%24E%244%3A%24E%2412)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Ewhere%20the%20weight%20is%20in%20B14%20or%20B15.%3C%2FP%3E%0A%3CP%3EBoth%20are%20in%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

I need help to create a formula that must spit out a price after taking weight into consideration.

 

I don't know how to produce this formula and would appreciate some help.

 

I attach the file and you can see what is needed. Can some good expert help with this?

 

@Sergei Baklanmaybe

7 Replies

@ClauP 

See attached and see if this answers your question. The shaded areas is what i added.

 

Hello @Riny_van_Eekelen 

No this doesn't answer the question. I need a formula that should be in the Total selling price column and take the transport fee and weight into consideration. Like C4 = D4+E4(transport fee) when weight is 1-1000.

C5 = D5+E5(transport fee) when weight is 1000-2000 and so on...

How can this be done???

 

@ClauP 

Sorry, but I don't get it. Assuming you don't just want to enter =D4+E4 in cell C4. Thought you wanted to calculate the total price as 10 plus the transportation cost depending on the weight. That would make perfect sense.

Could you otherwise indicate what outcome you want to see in numbers. Then. I'm sure we can create a formula for you.

 

Hello @Riny_van_Eekelen 

 

Yes you are correct. "Thought you wanted to calculate the total price as 10 plus the transportation cost depending on the weight. That would make perfect sense."

I want to calculate total price as 10 plus the transportation cost depending on the weight. I set C4 just so people understands where to put the "=".

 

Do you understand what I want now?

@ClauP 

My suggested solution did precisely that, I thought. The examples I gave were merely to demonstrate how to use the VLOOKUP function. For instance, when a package weighs 3250 grams the transportation cost is 42.50 (from the 3000-4200 weight group). But, for the VLOOKUP function to work I created an extra column that has the lower boundary of the weight groups as a number, as the function can not determine that the weight 3250 (being a number) falls in the group "3000-4200" being a text. the formula in D4 (my schedule) is =VLOOKUP(B4,G4:H12,2) finds the correct transport cost in the range G4:H12 based on the weight in B4.

Hello @Riny_van_Eekelen 

 

Mmm, I understand but it is not a complete solution how I see it. There are now two tables and you put the formula of Vlookup in the transport column. I want a single solution using one table and one column with focus on the column with total selling price. To me the Vlookup doenst quit fix it. Any other suggestions?

 

Can maybe @Sergei Baklan help as well?

best response confirmed by ClauP (Occasional Contributor)
Solution

@ClauP 

From my point of view @Riny_van_Eekelen gave right solution, it's better to keep transportation fee depends on weight in helper cells. From maintenance point of view that's much easier, any correction could be done in one place only, not in each formula.

But if you what to hardcode it that could be like

=D14+LOOKUP(B14,{0,1000,2000,3000,4200,15000,19000,40000,60000},{22.5,41.25,41.25,42.5,45.75,46.5,71.5,85.5,85.5})

or, if to use only your range

=D15+LOOKUP(B15,--LEFT($F$4:$F$12,SEARCH("-",$F$4:$F$12)-1),$E$4:$E$12)

where the weight is in B14 or B15.

Both are in attached.