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'

ABCD
1QuantityDescriptionPriceTotal
224MDF248
3
4

<tbody>
</tbody>


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

Thank you.

Pad
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
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
Thank you Steve! That was a really quick and perfect response!:)
 
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:-


ABCD
1QuantityDescription
Size
Total
224MDF3x3
10
Ply
3.6x3
4

<tbody>
</tbody>


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,216,753
Messages
6,132,516
Members
449,732
Latest member
Viva

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