Need Help with If statement

dsami0122

New Member
Joined
Mar 31, 2016
Messages
40
Office Version
  1. 365
Platform
  1. Windows
I have this if statement I created that works great to return multiple lines for a search:

=IFERROR(INDEX(Approved!$F$2:$F$738,SMALL(IF($A$4=Approved!$A$2:$A$738,ROW(Approved!$A$2:$A$738)-ROW(Approved!$A$2)+1),ROW(1:1))),"")

However What I need to add somehow is kind of if than

So if the value it returns from this range Approved!$F$2:$F$738 is equal to another field $H$4 than it returns "CostPlus"


EDIT:
Column I would return the words "Cost Plus" to be more specific
 

Attachments

  • Capture.JPG
    Capture.JPG
    29 KB · Views: 6
Last edited by a moderator:

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
taking it at face value
then an IF()

iferror (IF ( INDEX(Approved!$F$2:$F$738,SMALL(IF($A$4=Approved!$A$2:$A$738,ROW(Approved!$A$2:$A$738)-ROW(Approved!$A$2)+1),ROW(1:1))) = $H$4 , "Cost Plus", "" ) ,"")

but i suspect there is more to the question, as will the value returned - be exactly the same as the contents of H4 - or is there a RANGE of tolerance

as i say , thats the IF () for an exact match from the index formula and the value in H4 being equal
 
Upvote 0
taking it at face value
then an IF()

iferror (IF ( INDEX(Approved!$F$2:$F$738,SMALL(IF($A$4=Approved!$A$2:$A$738,ROW(Approved!$A$2:$A$738)-ROW(Approved!$A$2)+1),ROW(1:1))) = $H$4 , "Cost Plus", "" ) ,"")

but i suspect there is more to the question, as will the value returned - be exactly the same as the contents of H4 - or is there a RANGE of tolerance

as i say , thats the IF () for an exact match from the index formula and the value in H4 being equal
Yes the value must be exact the ending doesnt seem to be working that you suggested though I am getting an error of too many arguments for this function
 
Upvote 0
Yes the value must be exact the ending doesnt seem to be working that you suggested though I am getting an error of too many arguments for this function
Got it to partially work but the word COST PLUS are not showing the field is blank
 
Upvote 0
Got it to partially work but the word COST PLUS are not showing the field is blank
I got it thanks for your help
=IFERROR(IF(INDEX(Approved!$F$2:$F$660,SMALL(IF($A$4=Approved!$A$2:$A$660,ROW(Approved!$A$2:$A$660)-ROW(Approved!$A$2)+1),ROW(1:1))) = $H$4,0, "Cost Plus" ),"")
 
Upvote 0
I got it thanks for your help
=IFERROR(IF(INDEX(Approved!$F$2:$F$660,SMALL(IF($A$4=Approved!$A$2:$A$660,ROW(Approved!$A$2:$A$660)-ROW(Approved!$A$2)+1),ROW(1:1))) = $H$4,0, "Cost Plus" ),"")
NOPE THIS DIDNT WORK
 
Upvote 0
what is the result from
INDEX(Approved!$F$2:$F$660,SMALL(IF($A$4=Approved!$A$2:$A$660,ROW(Approved!$A$2:$A$660)-ROW(Approved!$A$2)+1),ROW(1:1)))
and make it 14decimal places
then do the same for H4

then in a different cell try
=H4= what ever cell the index formula is in
if that is false , when you expect true to match - thats the issue

going to need to see the xl2bb or spreadsheet

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

This will possibly enable a quicker and more accurate solution for you.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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