Formula to return value related to specific search term

Padthelad

Board Regular
Joined
May 13, 2016
Messages
64
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have two worksheets in the same workbook that I want to be able to transfer data from one to the other.

The first worksheet is a ‘quote’ form. Which will have, quantity, type of material and size.

I would like the information from a range of cells to filter from the ‘quote’ to a ‘job sheet’.

For example:-


A
B
C
D
1
QUANTITY
TYPE
SIZE
PRICE
2
1
Badminton
3x3
1000
3
2
Iden
4.8x4.8
1500
4
1
Cowbeech
3x3
2000

<tbody>
</tbody>

I need a formula that can search range A2:D4 for the type, say Badminton, and then return the size that relates to Badminton. I have a formula that gets the quantity which is:-

=IFNA(INDEX(Quote!$A$2:$D$4,MATCH(“Badminton”,Quote!$A$2:$D$4,0)),0)

I can’t seem to get it to work for what I need with the size. The problem occurs if I was to have two ‘types’ of different sizes. The amended formula fills two different cells with ‘3x3’ instead of only the one related to that ‘type’.

I hope this makes sense and any help anyone can provide is very much appreciated.

Thanks,

Pad
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
For this problem, why can't you use VLOOKUP, since Size is to the right of the column being searched for "Badminton"? I.e.
Rich (BB code):
=IFERROR(VLOOKUP("Badminton",Quote!$B$1:$D$4,2,0),0)

To return Size using INDEX+MATCH, edit in blue, try:
Rich (BB code):
=IFNA(INDEX(Quote!$C$2:$C$4,MATCH("Badminton",Quote!$B$2:$B$4,0)),0)
 
Last edited:
Upvote 0
Thank you Jack Dan Ice. This seems to be doing the trick for what we need at the moment.

Aladin - I was/am trying to return the related size of a 'type' to a cell in a different worksheet.
 
Upvote 0

Forum statistics

Threads
1,226,735
Messages
6,192,733
Members
453,752
Latest member
Austin2222

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