What's wrong with this formula?

Bobo3370

New Member
Joined
Sep 9, 2021
Messages
11
Office Version
  1. 2019
Platform
  1. Windows
=VLOOKUP(A2;IFS(C2="11";Baza_Aktivni_Instrastat_formula!A:H;IFormula!C2="12";Baza_Aktivni_Instrastat_formula!A:H;Formula!D2="FCA";Baza_Aktivni_Instrastat_formula!A:H;Formula!D2="EXW";Baza_Aktivni_Instrastat_formula!A:H;Formula!D2="DAP";Baza_Aktivni_Instrastat_formula!A:H;Formula!D2="CPT";Baza_Aktivni_Instrastat_formula!A:H;Formula!E2="1";Baza_Aktivni_Instrastat_formula!A:H;Formula!E2="2";Baza_Aktivni_Instrastat_formula!A:H;Formula!F2="3";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="BE";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="CZ";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="DE";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="GB";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="HU";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="IT";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="NL";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="PL";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="SE";Baza_Aktivni_Instrastat_formula!A:H;Formula!G2="SI";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="BD";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="BE";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="BG";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="CH";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="CN";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="CZ";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="DE";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="ES";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="FR";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="GB";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="HU";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="IE";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="IL";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="IN";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="IT";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="JP";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="KG";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="KR";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="MM";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="MX";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="NL";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="PK";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="PL";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="RO";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="RU";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="SE";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="SI";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="SK";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="TH";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="TN";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="TW";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="US";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="VN";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="XU";Baza_Aktivni_Instrastat_formula!A:H;Formula!H2="ZA";Baza_Aktivni_Instrastat_formula!A:H);2;FALSE)
 
So, did you try my suggested formula from post #6. It seems to produce exactly those results?
(apart from yours being upper case, unlike the yellow table they come from ;))
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I have copy paste it but it doesn't do anything. Maybe I am doing something wrong. Please help Peter.

Knjiga1
ABCDEFGHIJKLMNOPQRSTUV
1MATERIALDESCRIPTIONVPUIVPrZNORIGINMATERIALDESCRIPTIONVPUIVPrZNORIGIN
284311000=INDEX(P:P,AGGREGATE(15,6,ROW(P$2:P$23)/((O$2:O$23=A2)*(Q$2:Q$23=C2)*(R$2:R$23=D2)*(S$2:S$23=E2)*(T$2:T$23=F2)*(U$2:U$23=G2)*(V$2:V$23=H2)),1))11CPT13BETW84311000kuka11FCA13DEDE
38431100011EXW23NLNL84311000adapter11FCA13BEUS
48431498011DAP13HUDE84311000prsten11CPT13BETW
58448390011EXW23GBTW84311000prsten11FCA13SESE
68466102011FCA13SESE84311000držač iglica11EXW23NLNL
78466102011EXW23GBGB84311000držač iglica11CPT13DEUS
88467920011CPT13DECN84314980pokretna rola11DAP13HUDE
98467920011FCA13SESE84314980pokretna rola11DAP13DEDE
1084483900pribor11EXW23GBTW
1184661020Držać alata-adapter11FCA13SESE
1284661020Držać alata-trn11EXW23GBGB
1384661020Držać alata-trn11FCA13DEGB
1484679200prigušivač11CPT13BEIE
1584679200odstojnik11FCA13BEZA
1684679200odstojna cijev11CPT13BEFR
1784679200matica11FCA13SECN
1884679200ploča za polirku11FCA13GBGB
1984679200zadnja ploča11CPT13DECN
2084679200čahura11FCA13SESE
2184679200lopatice11CPT13BEXU
2284679200lopatice11CPT13BEZA
2384679200poluga11EXW23DEUS
List1
 
Upvote 0
I have copy paste it but it doesn't do anything. Maybe I am doing something wrong. Please help Peter.
It looks like your column B might be formatted as Text. Format the column to General and then enter the formula again.
 
Upvote 0
It works, awesome, thank You very much Peter. Can You please explain to me what does the number 15 and number 6 represent in the formula?
=INDEX(P:P,AGGREGATE(15,6,ROW(P$2:P$23)/((O$2:O$23=A2)*(Q$2:Q$23=C2)*(R$2:R$23=D2)*(S$2:S$23=E2)*(T$2:T$23=F2)*(U$2:U$23=G2)*(V$2:V$23=H2)),1))
 
Upvote 0
Ok, I have put the formula that I need and this is what I get.
The grey table is in sheet 1 "Formula" and the yellow table is in sheet 2 "Baza_Aktivni_Instrast_formula"

Sheet 1 "Formula"

Intrastat_Obrazac_prije sumiranja.xls
ABCDEFGH
1Šifra robeOpis robeVrsta posla (obje znamenke)Uvjeti isporukeVrsta prometaZemlja namjene/ isporukeZemlja podrijetla
239239000#NAME?11FCA13DECN
Formula
Cell Formulas
RangeFormula
B2B2=INDEKS(Baza_Aktivni_Instrastat_formula!B:B,AGGREGATE(2,10,ROW(Baza_Aktivni_Instrastat_formula!B$2:B$541)/((Baza_Aktivni_Instrastat_formula!A$2:A$541=Formula!A2)*(Baza_Aktivni_Instrastat_formula!C$2:C$541=Formula!C2)*(Baza_Aktivni_Instrastat_formula!D$2:D$541=Formula!D2)*(Baza_Aktivni_Instrastat_formula!E$2:E$541=Formula!E2)*(Baza_Aktivni_Instrastat_formula!F$2:F$541=Formula!F2)*(Baza_Aktivni_Instrastat_formula!G$2:G$541=Formula!G2)*(Baza_Aktivni_Instrastat_formula!H$2:H$541=Formula!H2)),1))



Sheet 2 "Baza_Aktivni_Instrast_formula"

Intrastat_Obrazac_prije sumiranja.xls
ABCDEFGH
1ŠIFRA ROBEOPIS ROBEVRSTA POSLAUVIJETI ISPORUKEVRSTA PROMETAZEMLJA NAMJENE / ISPORUKE ZEMLJA PODRIJETLA
3239239000Umetak za kutije11FCA13DECN
Baza_Aktivni_Instrastat_formula
 
Upvote 0
Looks like you might be using a non-English version of Excel and you have translated some function names to your language version (eg INDEX/INDEKS), but not AGGREGATE. You need to translate that too.

Also, it is a bad idea to use the sheet name of the sheet the formula is on. This can lead to hidden errors in some circumstances. So. since your formula is on the 'Formula' sheet you should get rid od Formula! wherever it is used to reference any cell or range on that sheet. I have marked a few of them, but not all, here:

1631270520066.png
 
Upvote 0
I have not noticed that. Thank You. I have changed it all to English bc I use Croatian version of Excel but still I do not get the result.
Now it shows me the error #Value!. Do You know what is the problem now?


Intrastat_Obrazac_prije sumiranja.xls
ABCDEFGH
1Šifra robeOpis robeVrsta posla (obje znamenke)Uvjeti isporukeVrsta prometaZemlja namjene/ isporukeZemlja podrijetla
239239000#VALUE!11FCA13DECN
Formula
Cell Formulas
RangeFormula
B2B2=INDEX(Baza_Aktivni_Instrastat_formula!B:B,AGGREGATE(2,10,ROW(Baza_Aktivni_Instrastat_formula!B$2:B$541)/((Baza_Aktivni_Instrastat_formula!A$2:A$541=A2)*(Baza_Aktivni_Instrastat_formula!C$2:C$541=C2)*(Baza_Aktivni_Instrastat_formula!D$2:D$541=D2)*(Baza_Aktivni_Instrastat_formula!E$2:E$541=E2)*(Baza_Aktivni_Instrastat_formula!F$2:F$541=F2)*(Baza_Aktivni_Instrastat_formula!G$2:G$541=G2)*(Baza_Aktivni_Instrastat_formula!H$2:H$541=H2)),1))
 
Upvote 0
I missed this before, but you have also changed the first two arguments in the AGGREGATE function from 15 and 6 to 2 and 10. Why did you do that?

My formula:
1631272167466.png


Your formula:
1631272194440.png
 
Upvote 0
I do not know why did I do that. I forgot to change it after you told me what are this numbers. Now it is working and thank you a lot Peter, you really helped me.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top