# return a value that satisfying two conditions

Occasional Contributor

# return a value that satisfying two conditions

Hello!

I am a beginner at Excel, what i am trying to do is :

table  A returns two conditions that table  B should take in consideration to send me the good value that i will use in a certain cell  in my table A , the hard thing is the table  A has an  unlimated columns and rows,

is there  any functions that i can  work with?  i know there is recherchev() but i can't see how to use it in this prob especially that my wanted value has to satisfy two conditions.

13 Replies

# Re: return a value that satisfying two conditions

Hi, Do you mean you want to use the VLOOKUP Function for multiple conditions? Please provide the Excel file to understand and solve your problem better. Thank you

# Re: return a value that satisfying two conditions

@nidhiachhaa9  thank you for your help so my table A is like that (with many rows)

for example to get 1 as result in table A i had to search the value according to (6MV & 20°) in table B

so i want to make  the action of getting the right data automatic but i dont know how?

Thanks alot

# Re: return a value that satisfying two conditions

this a template file of what i am doing. the purpose is to find how i can get the right value from the  table B  and put it in the table A. as you can see at the moment it is easy but if i started to creat many rows with different energy and angle , i will need a fuch to make it automatic and eiser for the user of my futur file.

# Re: return a value that satisfying two conditions

May I offer some feedback? Whoever created this spreadsheet--you or somebody else--spent far too much time on making it look pretty. I have nothing against beauty--the use of colors and formatting to make things stand out--but it makes for far greater usefulness if one FIRST concentrates on getting the functionality that is needed.

In your case, for example, that range of cells from I9 to I12 is made to look as if it's a single cell, but it isn't. It's four separate cells that have been merged into one. Great for looks; but it interferes with functionality.

Could I therefore suggest you step back and create a simpler layout of what you really need--we can make it prettier later--with rows of single cells and single columns. It's also not altogether clear what the relationship is between the parameters sheet and tables A and B...  And please, for the sake of testing, include not just a basic template with one or two sets of data; add more representative data so we can work with it.

What you're wanting to do is, I am confident, relatively easy with Excel's many ways to parse tables of data, but we need to work with well-defined tables at the start.

# Re: return a value that satisfying two conditions

Thank you alot for your feedback , the fact is , at the begining of my project i had a cetain look to give back so it is not really a choice however it is not a prob because i can use only one of these cells and results would still correct.
i tried to send this template to give only an idea of what i am doing but in fact the file excel is much bigger then this and so far i reached the goal of the project, the second step now is to make my file easy use and that by automatizing the choice of the right data in table B

# Re: return a value that satisfying two conditions

As I said, I'm not opposed to making a spreadsheet look nice. But work on that AFTER you've gotten the functionality you need. In sales, people often talk about the sizzle or the steak, with the cynical point "If you don't have a good steak, then sell the sizzle." In spreadsheet design, all too often, I see people devote far too much attention to the sizzle before getting the steak. By all means, make it pretty; first make it work.

With that in mind, please send the whole file, the bigger one...or at least a more representative one. A template does just what you've said--"give an idea"--but not much more. You want to have the bigger project more automated, and the template per se puts emphasis on appearance over functionality.

So please send a more complete file, with a more complete definition of how the parameters (or criteria) affect the selection of the data to appear. As has already been said in this thread, there are various ways within Excel to retrieve data based on criteria. VLOOKUP is the most basic. More recently there are functions like XLOOKUP and FILTER that are even more powerful. Here's a good resource if you want to research those on your own. https://exceljet.net/excel-functions/excel-xlookup-function

# Re: return a value that satisfying two conditions

I appreciate your advices , i completely understand your point of view, it is my first experience with Excel and the purpuse was to understand some mathematicals problrms which are related to the medical field , thats why i spent much time to understand that and give solutions so at this point i am doing well with and the next step is to present correctly my work in Excel.

here bellow you will find another template with much details.

Again i really appreciat your help and i hope it is going to be clear now.

# Re: return a value that satisfying two conditions

What isn't clear to me is how all the different sheets relate to one another. Nor is it clear what you're still working to resolve. You clearly have some functioning formulas in there--because you're working in French, a language I don't understand--I'm limited to begin with in trying to decipher what's going on.

So for me--and I suspect for others--to be able to help, this workbook is a good start (Thank you!) but we would need a much clearer description of what specific elements of information you are seeking to have retrieved, from what other part of the workbook, based on what criteria (and where those criteria are to be found).

# Re: return a value that satisfying two conditions

i am sorry i am a french speaker and thats explain my bad english
So the work is about determining the thickness of a radiotherapy room.
so the workbook Table 1 , tabla 2 Table 3 are not related to each other , all of them are related to the first notework where i do have my parameters which is automated and also Table 1, table
2 Table 3 are related to the workbook DataBase and this what i am trying to automate right now .
In the notework DataBase i wrote some remarks of what i am trying to do

# Re: return a value that satisfying two conditions

i am sorry i am a french speaker and thats explain my bad english

Truly, your English is not a problem at all.

So the work is about determining the thickness of a radiotherapy room.
so the workbook Table 1 , tabla 2 Table 3 are not related to each other , all of them are related to the first notework where i do have my parameters which is automated and also Table 1, table
2 Table 3 are related to the workbook DataBase and this what i am trying to automate right now .
In the notework DataBase i wrote some remarks of what i am trying to do

I see those brief remarks, but don't fully comprehend them (that is, I'm not able to take what you've written and think about them in the logical terms that are needed to come up with the formulas). Also, you have those columns in Table A3 and A2 filled in...so what is it that you're missing?

# Re: return a value that satisfying two conditions

Yes those columns are filed in by hand because i am the one who created the Excel so i know how to get the right data , but imagine for a certain user the situation it would be hard for him so what i am willing to do is :
let the user choose the angle and the enegy than the DataBse send the right value to the right column .
I undestand that it is hard for you to help me because you dont fully understan what i am hoping to do .
Anyway thank you alot you really tried to helped me and i appreciate that.

# Re: return a value that satisfying two conditions

those columns are filed in by hand because i am the one who created the Excel so i know how to get the right data , but imagine for a certain user the situation it would be hard for him so what i am willing to do is :
let the user choose the angle and the enegy than the DataBse send the right value to the right column .

So what you would need to do for "a certain user" is to explain in detail (1) where that user would find the angle and energy values, and then (2) how those values would be used to retrieve (look up) and then (3) "send the right value to the right column".....that's all I'm asking for too. Another way to say it, you know how to navigate around your tables; you need to take me (or that hypothetical new user) by the hand and show us both what you are taking for granted.