nostradamus
Board Regular
- Joined
- Aug 9, 2010
- Messages
- 143
- Office Version
- 365
- Platform
- Windows
Hi all,
I have a complicated Conditional Excel formula that needs improvement on:
Sheet1 =has the MATCH INDEX information
Sheet2 =is where I need the formula to be prepared/edited.
Currently,in Shee2:E2, I have a formula that matches info from Sheet2:C2 to Sheet1:C and pulls the appropriate info from Sheet1:D. So, the current formula in Sheet2:E2works great
{=IF(ISERROR(INDEX(Sheet1!$A:$D,MATCH($C2,Sheet1!$C:$C,FALSE),4)),"",INDEX(Sheet1!$A:$D,MATCH
($C2,Sheet1!$C:$C,FALSE),4))}
However,I have an addition in Sheet2 where info in Col.D needs to be used in determining what goes in Col.E (for instance, if nothing is in Sheet2:D2, then just put whatever info goes there (Col.E2). But if Sheet2:D2 has A or L, then that information needs to be taken into consideration from Sheet1:Col.D. Now,Col.D2-D6 currently has no A or L info; but in Col.D7, if L, then it's P, and if A, then it's CG.
Hopefully,you are able to understand what I am trying to get from this formula. Sheet2:Col.F shows the appropriate results I want.
Please see Sheet1 and Sheet2 info below: Thanks
Sheet1
<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Order[/TD]
[TD="align: center"]Family[/TD]
[TD="align: center"]Genus[/TD]
[TD="align: center"]FunctionalGroup[/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Lepidoptera[/TD]
[TD="align: center"]Pyralidae[/TD]
[TD="align: center"]Petrophila[/TD]
[TD="align: center"]SCR[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Elmidae[/TD]
[TD="align: center"]Ancyronyx[/TD]
[TD="align: center"]SCR/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Gyrinidae[/TD]
[TD="align: center"]Dineutus[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Helochares[/TD]
[TD="align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]SHR/P[/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Endochironomus[/TD]
[TD="align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Glyptotendipes[/TD]
[TD="align: center"]SHR/FC/CG[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
Sheet2
<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Order[/TD]
[TD="align: center"]Family[/TD]
[TD="align: center"]Genus[/TD]
[TD="align: center"]Stage[/TD]
[TD="align: center"]Trophic Guild[/TD]
[TD="bgcolor: #99cc00, align: center"]ResultWanted[/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Lepidoptera[/TD]
[TD="align: center"]Pyralidae[/TD]
[TD="align: center"]Petrophila[/TD]
[TD="align: center"]SCR[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Elmidae[/TD]
[TD="align: center"]Ancyronyx[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]SCR/CG[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Gyrinidae[/TD]
[TD="align: center"]Dineutus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Helochares[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]Cyphon[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #99cc00, align: center"]P/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]SHR/P[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/P[/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Endochironomus[/TD]
[TD="align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Glyptotendipes[/TD]
[TD="align: center"]SHR/FC/CG[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/FC/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]Odonata[/TD]
[TD="align: center"]Coenagrionidae[/TD]
[TD="align: center"]Argia[/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
I have a complicated Conditional Excel formula that needs improvement on:
Sheet1 =has the MATCH INDEX information
Sheet2 =is where I need the formula to be prepared/edited.
Currently,in Shee2:E2, I have a formula that matches info from Sheet2:C2 to Sheet1:C and pulls the appropriate info from Sheet1:D. So, the current formula in Sheet2:E2works great
{=IF(ISERROR(INDEX(Sheet1!$A:$D,MATCH($C2,Sheet1!$C:$C,FALSE),4)),"",INDEX(Sheet1!$A:$D,MATCH
($C2,Sheet1!$C:$C,FALSE),4))}
However,I have an addition in Sheet2 where info in Col.D needs to be used in determining what goes in Col.E (for instance, if nothing is in Sheet2:D2, then just put whatever info goes there (Col.E2). But if Sheet2:D2 has A or L, then that information needs to be taken into consideration from Sheet1:Col.D. Now,Col.D2-D6 currently has no A or L info; but in Col.D7, if L, then it's P, and if A, then it's CG.
Hopefully,you are able to understand what I am trying to get from this formula. Sheet2:Col.F shows the appropriate results I want.
Please see Sheet1 and Sheet2 info below: Thanks
Sheet1
A | B | C | D | |
<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Order[/TD]
[TD="align: center"]Family[/TD]
[TD="align: center"]Genus[/TD]
[TD="align: center"]FunctionalGroup[/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Lepidoptera[/TD]
[TD="align: center"]Pyralidae[/TD]
[TD="align: center"]Petrophila[/TD]
[TD="align: center"]SCR[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Elmidae[/TD]
[TD="align: center"]Ancyronyx[/TD]
[TD="align: center"]SCR/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Gyrinidae[/TD]
[TD="align: center"]Dineutus[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Helochares[/TD]
[TD="align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]SHR/P[/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Endochironomus[/TD]
[TD="align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Glyptotendipes[/TD]
[TD="align: center"]SHR/FC/CG[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4
Sheet2
A | B | C | D | E | F | |
<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Order[/TD]
[TD="align: center"]Family[/TD]
[TD="align: center"]Genus[/TD]
[TD="align: center"]Stage[/TD]
[TD="align: center"]Trophic Guild[/TD]
[TD="bgcolor: #99cc00, align: center"]ResultWanted[/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Lepidoptera[/TD]
[TD="align: center"]Pyralidae[/TD]
[TD="align: center"]Petrophila[/TD]
[TD="align: center"]SCR[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Elmidae[/TD]
[TD="align: center"]Ancyronyx[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]SCR/CG[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Gyrinidae[/TD]
[TD="align: center"]Dineutus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Helochares[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Scirtidae[/TD]
[TD="align: center"]Cyphon[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #99cc00, align: center"]SCR/CG/SHR[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]CG[/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Berosus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P;A=CG[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]L[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #99cc00, align: center"]P/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Hydrophilidae[/TD]
[TD="align: center"]Hydrocanthus[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]L=P/CG;A=P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: center"]Coleoptera[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]Haliplidae[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]SHR/P[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/P[/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Endochironomus[/TD]
[TD="align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/CG/FC[/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: center"]Diptera[/TD]
[TD="align: center"]Chironomidae[/TD]
[TD="align: center"]Glyptotendipes[/TD]
[TD="align: center"]SHR/FC/CG[/TD]
[TD="bgcolor: #99cc00, align: center"]SHR/FC/CG[/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: center"]Odonata[/TD]
[TD="align: center"]Coenagrionidae[/TD]
[TD="align: center"]Argia[/TD]
[TD="align: center"]P[/TD]
[TD="align: center"]P[/TD]
[TD="bgcolor: #99cc00, align: center"]P[/TD]
</tbody>
Excel tables to the web >> Excel Jeanie HTML 4