Vlookup + Match issue - excel

I have an issue with the formula below.
=VLOOKUP(B$22,Scenarios.New!$A$1:$M$211,MATCH(Output!$A27,Scenarios.New!$A$1:$M$1,0),FALSE)
Take a look at the image
This is basically doing one thing. Find the Action No. that is in the sheet "Scenario.New" of the Scenario ID 1017. It is working fine, as it returns 1,so formula is working, but sometimes I have 2 actions.
As you see. my formula will only look at the first Scend ID and will ignore the other one as is already found the first one. What I want to do is add a piece in the code that says Action No. = 1 or 2. Because based on the action No. some other fields will change too. Any ideas to solve it? Thanks!

first, i'm doubt with your question. second, your tabel is horisontal but you use VLOOKUP? or im wrong to undertand this?
but let me help you,i think you should try this,
table
enter image description here
=HLOOKUP(A5;Sheet1!$A$4:$G$5;2;FALSE)
take number 1 or 2 from table. but, if your table have double value be reference like image, HLOOKUP return first reference.

Related

How to select and view only a specific cell?

I want to extract from the next code, only the first value. Unfortunately, I was unable and I didn't found similar answer for my question.
So, here is the example of script:
**$1.61**
With bold I mark the value which I am interested to be visible. Only this value in one cell. Unfortunately I didn't have need the rest of values from table.
Here I will add my function (function will be use ):
=importxml("https://www.coingecko.com/en/coins/polygon","//td/span")
Please let me know how how to select to view only 1st line/value.
Thanks to all for support.
This should select 1st //td/span
=importxml("https://www.coingecko.com/en/coins/polygon","(//td/span)[1]")
Reference
https://librarycarpentry.org/lc-webscraping/02-xpath/index.html

I got #num! error in my formula I used in Excel. I would like to ask where I got an error and What should I do?

I have an excel file that is populated with a lot of formulas. I am trying to populate the result by subtructing the latest value to the previous value and dividing the result given in the cell. Please see the photo below. As you can see, starting in row 6 i used the formula of:
"=ABS(IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),10),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),9))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),9),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),8))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),8),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),7))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),7),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),6))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),6),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),5))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),5),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),4))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),4),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),3))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),3),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),2))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),2),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),1))/E7,IF(F7<=LARGE(IF(find3=$H7,$F$6:$F$196),1),(F7-LARGE(IF(find3=$H7,$F$6:$F$196),1))/E7*(F7-LARGE(IF(find3=$H7,$F$6:$F$196),2))/E7)))))))))))"
In order to get the result of =(f7-f6)/e7. I added if functions cause there are some values that the lookup value is mentioned ($H7) below the table. When the lookup function was changed (please see the second photo), the formula was changed also into this:
"=ABS(IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),10),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),9))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),9),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),8))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),8),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),7))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),7),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),6))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),6),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),5))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),5),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),4))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),4),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),3))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),3),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),2))/E15,IF(F15<=LARGE(IF(find3=$C15,$F$6:$F$196),2),(F15-LARGE(IF(find3=$C15,$F$6:$F$196),1))/E15,(F15-LARGE(IF(find3=$C15,$F$6:$F$196),2))/E15))))))))))"
But I've got a result of a #num! error. It's the same statement, the only difference is the looked up value. And when I try to show the calculation steps (Please see the third photo attached below), it says I've got an error in the first statement but why it was working on the first lookup value?
I am noob in excel. Please help me!!!
The reason for this error is that the LARGE function returns #NUM because the underlying array is empty / contains the FALSE result from your IF function (see here for details https://support.microsoft.com/en-us/office/large-function-3af0af19-1190-42bb-bb8b-01672ec00a64).
The reason here likely is that your find3=$C15,$F$6:$F$196 does not find a match.
Since we do not know what find3 is, you will need to look into the reason for that on your end (i.e., is there value of 5725 EGJ in your find3 data range? If not, why not? If yes, are you sure it spelled the same way (no leading spaces)?).
Once that is fixed you should be good to go.

If/And functions are not working correctly in my formula, can someone help me?

I have a field in my excel spreadsheet that depends on several different fields to determine the calculation that should be made. I think I have my formula correct but I am not getting the appropriate responses so I know there must be something I am missing. Let me start by summarizing what I am attempting to do.
If D5=2, then I need to verify if $AI$12-AB14>(3/24) and return a T if it is or leave the field blank if not. Alternatively, if D5=1, then I have to also verify that Y14=Y and Z14=Y, and finally $AC$12-AA14>(3/24) and return a T if so, or leave the field blank if not.
(The reference to 3/24 is required as I am performing time calculations from data entry fields pulling from a userform)
What I am receiving for a response is 'True'. That is not an option so I suspect it is returning the result of a specific logical statement? Below is my formula:
=IF(AND(D5="2",$AI$12-AB14>(3/24),),"T","")
=IF(AND(D5="1",Y14="Y",Z14="Y",$AC$12-AA14>(3/24),),"T","")
I can't insert an image in comments, so I'll reply. This simplified example shows how it works:
And pay attention to D5 - are there really values 1 and 2 as text. If not, the quotation marks must be removed from the formula

Simple Excel IF statement not working.

I have no idea why this isn't working. It looks exactly like multiple sources I have found around the web. What am I missing?
Code:
=IF(A1="Select all",B1="Yep",B1="Nope")
This is the result:
You only need to put the result values in the 2nd and 3rd arguments:
=IF(A1="Select all","Yep","Nope")
It looked like you were trying to assign the values to B1 cell, but what actually happens is you get the result of doing a comparison to check whether B1 is equal to "Yep", which is causes a circular reference error because the formula tries to look at itself.
You don't need to say B1="Yep" Just put
=IF(A1="Select all", "Yep", "Nope")

Excel match multiple records from timetable

I just stuck with my school homework, it seems easy, but there is always different errors and mistakes.
Context
All I need is to connect information from 3 pages.
The first one is timetable of trainings.
The second page is "groups"
Players page
Question
1) Here is my first question. How I can put the time from the "timetable" page ?
I tried vlookup with the easiest group "children 5-7" but even this doesnt work.
The problem is that there is many possible times of some groups and I need the answer like "17:00, 18:00 etc" then.
2) The second question is with the page "players".
Firstly I need to match group or coach from page "groups". For children all is simple, but excel dont want to work even with this. But, there is one problem more. In adult group there cant be more than 4 players in one group, that why I have TK1, TK2, TK3 and TK4 - all this are for adult A. and TK11, TK22 etc are for adult B. So when its done we should match court and time from page "groups".
There is my spreadsheet so be free to try it right here. Hope you will help me!
Ref
https://docs.google.com/spreadsheets/d/1PNp60xmHOx_Q1wBc33WrzIaWmeNG5UMhi-4roV7dJXU/edit#gid=1868650910
I try to give you some ideas about how to solve your issues
Question 1:
The issue you have with VLOOKUP is that you cannot search on the left of your lookup value in the reference table. As suggested above by BruceWayne, you may use INDEX/MATCH. Considering the structure of your data a good formula could be:
=INDEX('timetable try here'!B:G,MATCH(A2,CHOOSE(B2,'timetable try here'!C:C,'timetable try here'!D:D,'timetable try here'!E:E,'timetable try here'!F:F,'timetable try here'!G:G),0),1)
In fact I am using CHOOSE() to select the column where your case should match, because your courts are numbers from 1 to 5. You may replace this formula in the column D under the label Time in your sheet named "groups try here". By the way the result that you get is only the first occurrence (in case you see a zero with some decimals figures, remind to change format to hours), so you will not be able to get the list as you like. As far as I know Excel does not have such kind of formulas. What you could do is create a VBA formula by yourself. You can find more details in this other post always here in StackOverflow, where I replied to a similar question with some code. I believe that your case is exactly the same.
Question 2
In this part I just added the last argument to the VLOOKUP and your formula works. So the correct formula should be in cell E2 of "players try here":
=VLOOKUP(D2,'groups dont try here'!A2:C15,3,0)
and in cell F2 (Court) of the same sheet:
=VLOOKUP(D2,'groups dont try here'!A2:C15,2,0)
I believe you need also a formula to pick-up the time in cell G2 (time):
=VLOOKUP(D2,'groups dont try here'!A2:D15,4,0)
These formulas of course works with suitable groups starting with "children". For the others it is not very clear to me what you need. If you have grouped all TK in Adult A and Adult B you need to have some criteria to fill in the other cells from your sheet 'groups dont try here'. Also remind that if you recode the TK1 and TK2 (for instance by adding a new column to be used as key for the VLOOKUP), with VLOOKUP you will always pick up only the first occurrence in the table.
If you need more support, please leave a comment.

Resources