If text exists return value in corresponding, adjacent cell

Padthelad

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

HELP PLEASE!

I am having trouble using a combination of IF and VLOOKUP functions.

I have a quote form that I want to filter through to workshop sheet in the same workbook. I want to be able to search a range of cells on the quote form for an item, say MDF, and then return the quantity in the corresponding cell adjacent to MDF to the workshop order form.

For example (see example below); I want to be able to write a formula that can search range of cells A2:D4 for 'MDF' and then return the value that corresponds to 'MDF' (in this case cell A2, 24).

I have been using IF and COUNTIF, but can only get the formula to return a true/false (YES/NO) expression. I have been using =IF(COUNTIF(A2:D4,"MDF"),"yes"). I am thinking that I need the "yes" part of this formula to perform a VLOOKUP function to return 'If MDF then return value in cell next to MDF'

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Quantity[/TD]
[TD]Description[/TD]
[TD]Price[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]24[/TD]
[TD]MDF[/TD]
[TD]2[/TD]
[TD]48[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


Any help anyone can provide is very much appreciated, as I am going around in circles!

Thank you.

Pad
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
am I missing the reason why you cant have =IF(COUNTIF(A2:D4,"MDF")>0,A2,"")

or will it not always be in column B?
 
Upvote 0
am I missing the reason why you cant have =IF(COUNTIF(A2:D4,"MDF")>0,A2,"")

or will it not always be in column B?

You could if you only wanted to return A2. Depends if you need to return the value in the correct row where its found I suppose.
 
Upvote 0
Hi,

I have encountered another issue with this spreadsheet. On the quote form I have another column that has size of MDF in it. I would like to be able to filter through to another sheet what size MDF. See below:-


[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Quantity[/TD]
[TD]Description
[/TD]
[TD]Size
[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]24[/TD]
[TD]MDF[/TD]
[TD]3x3
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]10
[/TD]
[TD]Ply
[/TD]
[TD]3.6x3
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


I would like to be able to return the size in column C in the 'MDF' cell on another sheet, providing there is a quantity in the 'MDF' row in column A on this sheet.

I hope this makes sense.

Thanks,

Pad
.
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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