how to if$and properly

lu1zuk

New Member
Joined
Jul 30, 2021
Messages
33
Office Version
  1. 2019
Platform
  1. Windows
sobe e desce teste.xlsx
OPQRSTU
2Sobe ou Desce?Cargo Horas metasPontos
3MantemComandante de exercitoAspirante 86935336381541176030Aspirante10869353363815411760
4MantemCapitao tenente2Tenente 869353363815411761352 Tenente20869353363815411761
5MantemMajor1Tenente 869353363823816714401 Tenente30869353363823816714
6MantemCapitao tenenteSoldado 90120196276527923245Soldado10901201962765279232
7MantemComandante de exercitoTaifero 90120195955661621250Taifero10901201959556616212
8MantemSoldadoCabo 90120195590340617155Cabo10901201955903406171
9Mantem1 TenenteCapitao 86935336382381671560Capitao10869353363823816715
10MantemComandante de exercitoCapitao Tenente 86935336382381671665Capitao tenente10869353363823816716
11MantemGeneral de DivisaoCapitao de Corveta 86935336382381671770Capitao de Corveta10869353363823816717
12MantemTaiferoCapitao de Fragata 86935336382381671875Capitao de fragata10869353363823816718
13Mantem2 TenenteCapitao de Mar e Guerra 86935336382381671980Capitao de Mar e Guerra10869353363823816719
14MantemGeneral de DivisaoMajor 86935336382381672080Major10869353363823816720
15Mantem1 TenenteSub Tenente 90120193655506951085Sub Tenente10901201936555069510
16Mantem2 TenenteTenente Coronel 86935336382381672195Tenente Coronel10869353363823816721
17MantemTenente BrigadeiroSub Oficial 90120192960090112095Sub Oficial10901201929600901120
18MantemCapitaoCoronel 869353363823816722100Coronel10869353363823816722
19Mantem2 TenenteGuarda Marinha 901201926312566845100Guarda Marinha10901201926312566845
20MantemGeneral de ExercitoGeneral de Brigada 869353363832180797130General de Brigada10869353363832180797
21MantemMajorGen Divisao 869353363832180799150General de Divisao10869353363832180799
22MantemMajorGen Exercito 869353363832180801200General de Exercito10869353363832180801
23MantemAspiranteCom Exercito 869353363832180805250Comandante de exercito10869353363832180805
24MantemGeneral de ExercitoContra Almirante 869353363874131971500Contra Almirante10869353363874131971
25MantemMajorTenente Brigadeiro 869353363874131972500Tenente Brigadeiro10869353363874131972
26MantemAspirante
27MantemAspiranteSobe
28MantemAspiranteSobe
29MantemContra Almirante10
30MantemAspirante250Comandante de exercito
31MantemTaifero==SE(P3<>"";SE(L3>=ÍNDICE(R$3:R$25;CORRESP(P3;S$3:S$25;0));SE(M3>=ÍNDICE(T$3:T$25;CORRESP(P3;S$3:S$25;0));"Sobe";"Mantem")))
32MantemCapitao de Mar e GuerraVERDADEIRO
Planilha1
Cell Formulas
RangeFormula
O3:O32O3=IF(P3<>"",IF(M3>=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0)),"Sobe","Mantem"),"")
P3P3=IFERROR(@INDEX(S$3:S$25,AGGREGATE(15,6,(ROW(S$3:S$25)-ROW(S$3)+1)/ISNUMBER(SEARCH(U$3:U$25,E3)),1)),"")
P4:P32P4=IFERROR(INDEX(S$3:S$25,AGGREGATE(15,6,(ROW(S$3:S$25)-ROW(S$3)+1)/ISNUMBER(SEARCH(U$3:U$25,E4)),1)),"")
S13:S14S13=LEFT(Q13,FIND(8,Q13)-2)
U3:U25U3=RIGHT(Q3,18)
Q27Q27=IF(P3<>"",IF(L3>=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0)),IF(M3>=INDEX(T$3:T$25,MATCH(P3,S$3:S$25,0)),"Sobe","Mantem")))
Q28Q28=IF(P3<>"",IF(L3>=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0)),IF(M3>=INDEX(T$3:T$25,MATCH(P3,S$3:S$25,0)),"Sobe","Mantem")))
Q29Q29=INDEX(T$3:T$25,MATCH(P3,S$3:S$25,0))
Q30Q30=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0))
Q32Q32=IF(P3<>"",IF(AND(INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0))),(M3>=INDEX(T$3:T$25,MATCH(P3,S3:S$25,0)))))


The idea is to use an IF-AND arg where its need the 2 to be fullfiled to say "subiu" or "desce"
If L3 corresponds to the index$match in and p3 also corresponds to the next index$match, if true "up" if false "down". I'm trying to do it but whenever I get to the point of the second logical test I can't "close" it itself
i tryed but failed.
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
How about
Excel Formula:
=IF(P3<>"",IF(AND(L3>=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0)),M3>=INDEX(T$3:T$25,MATCH(P3,S$3:S$25,0))),"Sobe","Mantem"),"")
 
Upvote 0
How about
Excel Formula:
=IF(P3<>"",IF(AND(L3>=INDEX(R$3:R$25,MATCH(P3,S$3:S$25,0)),M3>=INDEX(T$3:T$25,MATCH(P3,S$3:S$25,0))),"Sobe","Mantem"),"")
Thanks! How if i want another if, not included in the if$and, i could use it in the true/false location just normal, right?
 
Upvote 0
I'm afraid I have no idea what you are saying.
 
Upvote 0

Forum statistics

Threads
1,223,889
Messages
6,175,224
Members
452,620
Latest member
dsubash

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