excel help - index match formula with if conditon

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
968
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,

Below is my data and expected output is in Column G,
By combining column E and F, extract value from Column C,
and criteria is Column D value should be greater than 0.

Below formula works, without conditon of criteria D.
'=INDEX($C$2:$C$4,MATCH($F2&"|"&$E2,$A$2:$A$4&"|"&$B$2:$B$4,0))


Book1
ABCDEFG
1InvoiceTicketAmountxxxTicketInvoiceExpected Output
267811150000111678-
367533310001444675-
4672222800022226728000
5671444100036714441000
6
7=INDEX($C$2:$C$4,MATCH($F2&"|"&$E2,$A$2:$A$4&"|"&$B$2:$B$4,0))
Sheet1


Thanks
mg
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
968
Office Version
  1. 2010
Platform
  1. Windows
Hi Team,

I am trying below formula, but its not working,
expected output shown in Column h.

=IF(D2>0,IFERROR(INDEX($C$2:$C$4,MATCH($F2&"|"&$E2,$A$2:$A$4&"|"&$B$2:$B$4,0)),"-"),"-")

Book1
ABCDEFGH
1InvoiceTicketAmountxxxTicketInvoiceExpected OutputExpected Output
267811150000111678--
367533310001444675--
467222280002222672-8000
567144410003671444-1000
6
7
Sheet1
Cell Formulas
RangeFormula
G2:G5G2=IF(D2>0,IFERROR(INDEX($C$2:$C$4,MATCH($F2&"|"&$E2,$A$2:$A$4&"|"&$B$2:$B$4,0)),"-"),"-")
Press CTRL+SHIFT+ENTER to enter array formulas.


Thanks
mg
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
81,420
Office Version
  1. 365
Platform
  1. Windows
Delete G2:G5, then put the formula into G2 confirm it with CSE & then drag the formula down.
 

Mallesh23

Well-known Member
Joined
Feb 4, 2009
Messages
968
Office Version
  1. 2010
Platform
  1. Windows
Hi Fluff,

Wow, great observation , it worked. (y) ?

=IF(D5>0,IFERROR(INDEX($C$2:$C$5,MATCH($F5&"|"&$E5,$A$2:$A$5&"|"&$B$2:$B$5,0)),"-"),"-")

Thanks
mg
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
81,420
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback.
 

Forum statistics

Threads
1,186,105
Messages
5,955,862
Members
438,222
Latest member
nalij_bond

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
Top