SOLVED

formula needed for VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-2742903%22%20slang%3D%22de-DE%22%3Eformula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2742903%22%20slang%3D%22de-DE%22%3E%3CP%3EGood%20evening%2C%20I%20am%20looking%20for%20an%20VLOOPUP%20formula%20or%20other%20formula%2C%20which%20check%20two%20base%20(BER%20and%20LEJ)%20from%20table%20in%20whole%20table%20on%20various%20columns%20and%20the%20dedicated%20price%20for%20the%20base%20from%20another%20sheet%20and%20should%20automatic%20fill%20in%20the%20correct%20figure%20in%20the%20fieled%20park%20in%20sheet%20%22base%22.%26nbsp%3B%3CBR%20%2F%3EI%20have%20attached%20the%20excel%20table.%20Thank%20you%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2742903%22%20slang%3D%22de-DE%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2742945%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2742945%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1153172%22%20target%3D%22_blank%22%3E%40MirDia1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESee%20the%20attached%20version.%20The%20formula%20in%20B2%20is%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DWENNFEHLER(SVERWEIS(A2%3Bpark!%24A%242%3A%24B%243%3B2%3BFALSCH)%3B%22%22)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2743521%22%20slang%3D%22de-DE%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2743521%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20Hi%2C%20thank%20you.%26nbsp%3B%20I%20have%20tried%20for%20another%20table%2C%20see%20attachment.%26nbsp%3B%3CBR%20%2F%3EThe%20formula%20should%20be%20from%20FL%20program%20and%20Expenses%20per%20Week.%3CBR%20%2F%3EIn%20the%20column%20Parking%20should%20look%20up%20from%20Column%20%22D%22%20if%20DUS%20or%20LEJ%20and%20check%20price%20from%20sheet%20%22Expenses%20per%20Week%22%20from%20A3%20to%20B4%2C%20Like%20if%20DUS%20than%20888%20and%20if%20LEJ%20than%20999%20should%20automatically%20be%20display%20at%20the%20column%20in%20%22Parking%22%20in%20sheet%20FL%20program.%26nbsp%3B%3CBR%20%2F%3E%3CBR%20%2F%3ELooking%20forward%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20P.S.%20Can%20then%20i%20just%20copy%20free%20to%20another%20tables%20and%20what%20should%20i%20take%20attention%20to.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2745065%22%20slang%3D%22de-DE%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2745065%22%20slang%3D%22de-DE%22%3EHi%2C%20thanks%20a%20lot%20for%20your%20cooperation.%3CBR%20%2F%3EIs%20it%20possible%20to%20create%20a%20formula%20which%20uses%20VLOOKUP%20from%20differnt%20excel%20file%3F%3CBR%20%2F%3EThank%20You%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2745208%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2745208%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1153172%22%20target%3D%22_blank%22%3E%40MirDia1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYes.%20that%20is%20possible.%20Here%20are%20the%20steps%3A%3C%2FP%3E%0A%3CP%3EOpen%20both%20the%20workbook%20with%20the%20lookup%20range%20and%20the%20workbook%20where%20you%20want%20the%20formula.%3C%2FP%3E%0A%3CP%3ESelect%20the%20cell%20where%20you%20want%20the%20formula.%3C%2FP%3E%0A%3CP%3EStart%20typing%20the%20formula%2C%20for%20example%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSVERWEIS(A2%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20use%20the%20mouse%20or%20the%20keyboard%20to%20switch%20to%20the%20other%20workbook.%3C%2FP%3E%0A%3CP%3EActivate%20the%20sheet%20with%20the%20lookup%20range.%3C%2FP%3E%0A%3CP%3ESelect%20the%20lookup%20range.%20You%20will%20see%20something%20like%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSVERWEIS(A2%3B'%5BExterneDatei.xlsx%5DBlatt%202'!%24A%242%3A%24B%24100%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EComplete%20the%20formula%20the%20normal%20way%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSVERWEIS(A2%3B'%5BExterneDatei.xlsx%5DBlatt%202'!%24A%242%3A%24B%24100%3B2%3BFALSCH)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EPress%20Enter%20and%20check%20whether%20it%20returns%20the%20expected%20result.%3C%2FP%3E%0A%3CP%3EIf%20it%20does%2C%20switch%20to%20the%20other%20workbook%20and%20close%20it.%20The%20formula%20will%20now%20include%20the%20path%20of%20the%20other%20workbook%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DSVERWEIS(A2%3B'C%3A%5CExcel%5C%5BExterneDatei.xlsx%5DBlatt%202'!%24A%242%3A%24B%24100%3B2%3BFALSCH)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESave%20the%20workbook.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2746587%22%20slang%3D%22de-DE%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2746587%22%20slang%3D%22de-DE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20Hi%2C%20attached%20one%20file%20with%20sheets%20%22program%22%20and%20%22taxes%22.%26nbsp%3B%3CBR%20%2F%3EI%20have%20filled%20in%20automatically%20in%20column%20taxes%20the%20figures%20according%20to%20requirements%20of%20destination%20and%20origin.%20Is%20it%20possible%20to%20create%20such%20VLOOKUP%3F%3CBR%20%2F%3E%3CBR%20%2F%3ELike%20e.g.%20once%20again%3A%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20BER%20SOF%20-%26gt%3B%20pax%20fees%20EU%20(45%2C10%20eur)%20from%20sheet%20%22taxes%22%20vlookup%20%3CBR%20%2F%3E%20BER%20HRG%20-%26gt%3B%20pax%20fees%20ex%20EU%20(55%2C10%20eur)%20from%20sheet%20%22taxes%22%20vlookup%20%3CBR%20%2F%3E%3CBR%20%2F%3E%20All%20according%20to%20rules.%3CBR%20%2F%3E%3CBR%20%2F%3EThank%20You%3CBR%20%2F%3E%3CBR%20%2F%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2746641%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2746641%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1153172%22%20target%3D%22_blank%22%3E%40MirDia1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ECan%20you%20explain%20how%20you%20arrive%20at%2045%2C10%20for%20BER%20SOF%20and%20at%2055%2C10%20for%20BER%20HRG%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2746981%22%20slang%3D%22de-DE%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2746981%22%20slang%3D%22de-DE%22%3EHi%2C%20the%20figures%20are%20predefined.%3CBR%20%2F%3EIn%20regards%20of%20BER%20SOF%20and%20price%2C%20the%20system%20has%20to%20check%20%22BER%22%20and%20%22SOF%22.%20The%20BER%20is%20in%20EU%20as%20start%20and%20SOF%20as%20destination%20is%20also%20in%20EU%20and%20due%20to%20this%20comes%20to%2045%2C10%20eur.%3CBR%20%2F%3EFor%20the%20BER%20HRG%2C%20the%20destination%20of%20HRG%20is%20not%20in%20EU%20as%20destination%2C%20and%20thatfore%20ex%20BER%20(start)%20the%20price%20for%20non%20EU%20is%2055%2C10%20eur.%3CBR%20%2F%3EBest%20regards%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2747097%22%20slang%3D%22en-US%22%3ERe%3A%20formula%20needed%20for%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2747097%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1153172%22%20target%3D%22_blank%22%3E%40MirDia1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHow%20can%20the%20formula%20%22know%22%20that%20BER%20is%20in%20EU%20and%20LAX%20is%20not%3F%20I%20know%20that%20and%20you%20know%20that%2C%20but%20Excel%20doesn't.%20Both%20have%20EU%20and%20ex%20EU%20fees.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Good evening, I am looking for an VLOOPUP formula or other formula, which check two base (BER and LEJ) from table in whole table on various columns and the dedicated price for the base from another sheet and should automatic fill in the correct figure in the fieled park in sheet "base". 
I have attached the excel table. Thank you in advance

23 Replies

@MirDia1985 

See the attached version. The formula in B2 is

 

=WENNFEHLER(SVERWEIS(A2;park!$A$2:$B$3;2;FALSCH);"")

@Hans Vogelaar 

Hi, thank you. I have tried for another table, see attachment. 
The formula should be from FL program and Expenses per Week.
In the column Parking should look up from Column "D" if DUS or LEJ and check price from sheet "Expenses per Week" from A3 to B4, Like if DUS than 888 and if LEJ than 999 should automatically be display at the column in "Parking" in sheet FL program. 

Looking forward

P.S. Can then i just copy free to another tables and what should i take attention to.

@MirDia1985 

There are two problems:

  1. Cell A4 on the EXPENSES sheet contains a space after DUS: "DUS " instead of "DUS". This prevents the VLOOKUP formula from finding a match for "DUS". Remove that space.
  2. There are spaces at the end of the name of the EXPENSES sheet: it is "EXPENSES_PER_WEEK   " instead of "EXPENSES_PER_WEEK". Remove those spaces from the name of the sheet and from the VLOOKUP formulas.

Also, I'd use $A$3:$B$4 as lookup range. That way, you can copy the formula up or down and the range will stay the same.

After making the changes in 1. and 2. above, Select AH7:AH53 on FL_Program.

Enter the formula

 

=IFERROR(VLOOKUP(D7,EXPENSES_PER_WEEK!$A$3:$B$4,2,FALSE),"")

 

In German:

 

=WENNFEHLER(SVERWEIS(D7;EXPENSES_PER_WEEK!$A$3:$B$4;2;FALSCH);"")

 

and press Ctrl+Enter to populate all selected cells. Excel will automatically adjust D7 to D8 ... D53 in the rows below, while keeping $A$3:$B$4 the same.

 

Another problem: the formulas in column S perform a lookup of the currency in column R in R1:S2. But R1 and R2 contain 111 and 110, not USD or similar. I don't know what you intended there.

 

See the attached version.

 

P.S. M1 contained a #REF! error so I entered 1,18

Hi, thanks a lot for ur cooperation.
Is it possible to create a formula which uses VLOOKUP from differnt excel file?
Thank you

@MirDia1985 

Yes. that is possible. Here are the steps:

Open both the workbook with the lookup range and the workbook where you want the formula.

Select the cell where you want the formula.

Start typing the formula, for example

 

=SVERWEIS(A2;

 

Now use the mouse or the keyboard to switch to the other workbook.

Activate the sheet with the lookup range.

Select the lookup range. You will see something like

 

=SVERWEIS(A2;'[ExterneDatei.xlsx]Blatt 2'!$A$2:$B$100

 

Complete the formula the normal way:

 

=SVERWEIS(A2;'[ExterneDatei.xlsx]Blatt 2'!$A$2:$B$100;2;FALSCH)

 

Press Enter and check whether it returns the expected result.

If it does, switch to the other workbook and close it. The formula will now include the path of the other workbook:

 

=SVERWEIS(A2;'C:\Excel\[ExterneDatei.xlsx]Blatt 2'!$A$2:$B$100;2;FALSCH)

 

Save the workbook.

@Hans Vogelaar 

Hi, attached one file with sheets "program" and "taxes".
I have filled in automatically in column taxes the figures according to requirements of destination and origin. Is it possible to create such VLOOKUP?

Like e.g. once again:

BER SOF -> pax fees EU  (45,10 eur) from sheet "taxes" vlookup
BER HRG -> pax fees ex EU (55,10 eur) from sheet "taxes" vlookup

All according to rules.

Thank you

 

@MirDia1985 

Can you explain how you arrive at 45,10 for BER SOF and at 55,10 for BER HRG?

Hi, the figures are predefined.
In regards of BER SOF and price, the system has to check "BER" and "SOF". The BER is in EU as start and SOF as destination is also in EU and due to this comes to 45,10 eur.
For the BER HRG, the destination of HRG is not in EU as destination, and thatfore ex BER (start) the price for non EU is 55,10 eur.
Best regards

@MirDia1985 

How can the formula "know" that BER is in EU and LAX is not? I know that and you know that, but Excel doesn't. Both have EU and ex EU fees.

@Hans Vogelaar 

Hi, i created an table with predefined routes and taxes for them.
Now it should work.
Thx

@MirDia1985 

A simple VLOOKUP / SVERWEIS will work.

best response confirmed by Hans Vogelaar (MVP)
Solution
Hi, is it possible to lookup for price only in column C, but to search in columns A and C, but exclude column B. Thx
Hi, can u pls send me formula. Should be like the one you send last time, but with the exclude. Thx

@MirDia1985 

 

I used

 

=IFERROR(VLOOKUP(A2&"-"&C2,'pax tax'!A:C,3,FALSE),0)

 

=WENNFEHLER(SVERWEIS(A2&"-"&C2;'pax tax'!A:C;3;FALSCH);0)

Hi, is there any possibilty to check as well from another excel table, to use the formula only and place figure if currency in dedicated column in in EUR, if not than figure 0.

Of course than we have to make sure, that the currency in column is set up to currency EURO from settings.

Thx

@MirDia1985 

I'm afraid I don't understand. Could you attach a sample workbook and explain in detail what you want?

@Hans Vogelaar 
Hi, thank you. Pls see attached files. I have entered in both data. the data in buc estimate excel has to vlookup from buc taxes (figures) and currency and place in dedicated column. So the formula should either place 0 as figure or the dedicated figure from buc taxes. Hope you understand. Best

@MirDia1985 

There was no way I could have guessed that from your previous post.

This is more complicated than you'd think, because it depends on the number format of the cells in the buc taxes sheet. We need VBA to read the number format, so the buc estimates workbook is now a .xlsm, and you'll have to allow macros when you open it. Also, the buc taxes workbook must be open in Excel for it to work.