I am having issues creating a formula that will give me a set value based on multiple criteria.
Example:
If Col A="yes"
AND if Col B="No"
AND if Col C= "2"
AND if Col D= "B"
AND if Col E= "X"
Then "Col F"
if not "0"
I am putting together a multiple sheet workbook that is used as a template to submit to the Medicare. I am currently having to manually look up and enter all information for each discipline. What I want is for a cell to look on another worksheet search data in 5 or 6 columns and if they all match the specific criteria asked for it returns the value listed.
The data worksheet contains about 1500 lines and 30 columns total...I only need to use a specific few columns, but every line.
We have tried mutiple/nested if statements and and statements (although not sure I am doing them right) and always get an error about too many criteria.
Any help would be appreciated, thanks!
Hi Mandy1010,
Otherwise it would help to post a sample workbook.Code:=IF(AND(A2="Yes",B2="No",C2=2,D2="B",E2="X",F2,0)
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Sorry to correct this, but there was a closing parenthesis missing, corrected code, thanks for the 'And' function, I was putting together a string of if statements, but this made it real easy.
Code:=IF(AND(A2="Yes",B2="No",C2=2,D2="B",E2="X"),F2,0)
Last edited by teylyn; 01-31-2010 at 03:43 AM. Reason: quote deleted
Happy Excel'ing!
Ok I tried that formula and am getting a #Value error, which is better than nothing, but isn't helping me.
Let me try to better explain. My "Data" is 1500 lines of names, titles, IDs, numbers, dates, figures, dollars, etc. I need to search all 1500 lines and 5 or 6 columns and return a value if all criteria in the same line are true. I created a sample workbook since I can't send my actual data. I am needing the formula to search all lines of data to return the corresponding number to the letter sequence I am searching for. I also left the formula on there with the Value error....maybe I entered something wrong.
Hopefully the attachment works.
Data page is the data that needs to be searched and my results page is what I am searching for.
Thanks again for the help!
Hi Mandy,
Not really quite sure want you are after, but check out the attached.
If I read it right it almost seems like you require a Vlookup.
Look on the Data tab and I turned it into a table based off the comments you had.
Rocky1
I had thought that a LOOKUP formula would work but have NEVER used one. I don't know how to read it but I don't think thats coming out right. I attached more specific data for what I am needing.
I need a formula that will search data and return a specific value, both number and dollar amount, On the attachment I have listed data that resembles what I am needing to search. The results page has the configurations I need it to search and return a value and dollar amount for.
I have reattached the excel test.
I know this is confusing, we worked on it for a few hours the other day with no luck.
There may be no way for us to enter a formula....right now I am manually looking up data and manually transferring information from one worksheet to another. Its easy work but when you have hundreds of these to do, time adds up. We would like for it to be all automatic as soon as the data is downloaded into the template.
Thanks again everyone!
Hi Mandy1010,
If you're willing to separate your search criteria, this may help:
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
what about on results sheet c1
=INDEX(Data!$G$1:$G$8,MATCH(A1,INDEX(Data!$A$1:$A$8&Data!$B$1:$B$8&Data!$C$1:$C$8&Data!$D$1:$D$8&Dat a!$E$1:$E$8,0),0))
as you have 2007 wrap it up in an iferror
=iferror(=INDEX(Data!$G$1:$G$8,MATCH(A1,INDEX(Data!$A$1:$A$8&Data!$B$1:$B$8&Data!$C$1:$C$8&Data!$D$1 :$D$8&Data!$E$1:$E$8,0),0)),0)
Mojito connoisseur and a dabbler in Cisco
where does code go ?
look here
how to insert code
how to enter array formula
why use -- in sumproduct
recommended reading
wiki Mojito
how to say no convincingly
most important thing you need
Martin Wilson: SPV
and RSMBC
ConneXionLost
I cant seperate the results sheet and the data is already seperated so I don't think that will work.
Martindwilson
That worked great for the ABCDE example but when I copied and modified it for the 933 W OUT example I am just getting "0" as a result for everything. I might be modifying it wrong but would you mind looking at? I really appreciate it!!
I have attached the excel workbook with the iferror formula so you could see if I modified it wrong. Thanks again!!
Hi Mandy1010,
Because you need to keep your results criteria in one cell, you'll need to account for the spaces you've added in the process. So modifying martinwilson's formula for this gives:
for cell Results!B10
Code:=IFERROR(INDEX(Data!$F$17:$F$33,MATCH(A10,INDEX(Data!$A$17:$A$33&" "&Data!$B$17:$B$33&" "&Data!$C$17:$C$33&" "&Data!$D$17:$D$33&" "&Data!$E$17:$E$33,0),0)),0)
and for cell Results!C10
Code:=IFERROR(INDEX(Data!$G$17:$G$33,MATCH(A10,INDEX(Data!$A$17:$A$33&" "&Data!$B$17:$B$33&" "&Data!$C$17:$C$33&" "&Data!$D$17:$D$33&" "&Data!$E$17:$E$33,0),0)),0)
Cheers,
Docendo discimus.
Please consider:
- Thanking those who helped you. Click the reputation icon
in the contributor's post and add Reputation.
- Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.
Thank you Thank you Thank you.....I tested it with my actual formula and it works perfect....
Thanks again!!
Hi,
Would need your expertise on this.
I'm trying to capture the highest number on a given group. Been playing around with index and match and I can't seem to make it worked.
For example,
Group Name, count
group A, 12
group A, 13
group A, 15
group B, 3
group B, 2
the output cell should give me something like:
Group Name, max count
group A, 15
group B, 3
thanks guys...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks