Validation of missing data - excel-formula

I need to come up with a validation in a summary sheet of excel. The validation will display the cell reference ( not value) from a column in another excel worksheet. The validation is simple enough: Check column A - rows 1 to 100. If these are non-blank, then column B - rows 1 to 100 also need to be non-blank; in case any cell in column B is blank then return the cell reference to the summary sheet.
In case Column A ( any of the rows ) is blank, then column B also should be blank.
Thanks.

Here's a formula that should do exactly what your asking for, unless I misunderstood the question. It assumes your data starts in Sheet1 cell A1.
=IF(AND(OR(ISBLANK(Sheet1!$A1),ISNA(Sheet1!$A1)),AND(NOT(ISBLANK(Sheet1!$B1)),NOT(ISNA(Sheet1!$B1)))),"B"&ROW(Sheet1!$B1),IF(AND(AND(NOT(ISBLANK(Sheet1!$A1)),NOT(ISNA(Sheet1!$A1))),OR(ISBLANK(Sheet1!$B1),(ISNA(Sheet1!$B1)))),"B"&ROW(Sheet1!$B1),"Valid"))
I tested this and it works fine. Tailor it to work with your workbook and let me know if it works for you.

Related

How can I return a lookup value from a third column from a reference value in two cells?

I have an excel file with two sheets. I'm trying to reference one sheet's numbers based on text using a formula in the other sheet. I have one sheet that looks something like this -
And another that looks like this -
I would like to put a formula on the first sheet that basically says - look on the second sheet for the values in columns A and B and return me the value in column C. The tricky part is - the values in the first sheet may be inverted or there may be an instance where only one value is present, like in row 1 in the first sheet. Also the formula should only fill in a value if both columns match. All text combinations in Sheet 2 are unique.
So for example - on the first sheet the formula should return 1 in cell C1, 5 in cell C4, and would error in the other 2 cells.
I hope that wasn't too confusing. I would greatly appreciate any help you can give.
Thank you!
Add two sumifs together:
=SUMIFS(G:G,E:E,IF(A1="","",A1),F:F,IF(B1="","",B1))+SUMIFS(G:G,F:F,IF(A1="","",A1),E:E,IF(B1="","",B1))

VLOOKUP not returning correct values

Maybe I'm using ´VLOOKUP´ wrong, but I've tried even using a table array. It continuously returns a ´N/A´ or ´#REF´ error back to me.
The spreadsheet is setup with a sheet titled 'Character', ´C6´ is a drop down menu, and ´D6´ is where the ´VLOOKUP´ formula is being written. I have a 2nd sheet listed named, 'Weapon', which is a 13 row sheet with various different text and numerical data information. I'm only trying to pull the numerical data from the 6th row, or column F.
So, this is the function I'm writing:
´=VLOOKUP($C$6,Weapon!$A$2:$M$78,6,0)´
What's odd about this is if I check
´=VLOOKUP($C$6,Weapon!$A$2:$M$78,1,0)´
It will return the text data of the first result in the A column on the 'Weapon' sheet, but it won't return anything else in B,C,D,E,etc. columns if I change that 1 to a 2,3,4,5, etc.
Any insight would be great.
For VLOOKUPs to work, it's the lookup value that is the critical part. And that critical part has to be unique and it has to be in the first column. Your table of data on the Weapon sheet has "Staff" in Column A.
A quick fix for you is to change your formula to
=VLOOKUP($C$6,Weapon!$B$2:$M$78,5,0)
Notice the left-most column of the range is now column B and we're getting data from the 5th column.
This assumes that your values in column B are unique and will match up with the values in your drop-down menu in C6 on the Character sheet.

Comparing a value in between with a values of a column

My excel have 2 sheet. First sheet contains a Target column. There is a Point Column as well. I want if the target value in between sheet2 then corresponding point of sheet2 is plased in the Point column of sheet1. I try using vlookup but its works only the value of sheet2 is exactly same, not in the range. Any help will be appricite.
Note that the sheet should give point n if it is between (n-1)*100000+1 and n*100000.
So just take D5 = ROUNDUP(B5/100000, 0) and it will work, in this specific case.
It is also likely to be much faster than using VLOOKUP.

Match cell from multiple worksheets

I have an Excel spreadsheet with multiple sheets. Sheet 1 has a lookup value in column A that, if it exists in another sheet, I want to return the value from the cell on the same row in the other sheet but from column D. I have managed to get it working if I hard code the sheet:
=IF(ISERROR(MATCH(A6,Sheet2!B:B,0)),"",INDEX(Sheet2!B:B,MATCH(A6,Sheet2!B:B),0))
I don't however want to restrict the search to Sheet2. I have tried to generate a named range SheetList to use with INDIRECT() to replace the lookup array like this:
=IF(ISERROR(MATCH(A6,(INDIRECT("'"&SheetList&"'!B:B")),0)),"",INDEX(INDIRECT("'"&SheetList&"'!A:A"),MATCH(A6,(INDIRECT("'"&SheetList&"'!B:B")),0)))
but I can't get it to work. I feel it is time to admit defeat and ask for help!
Thanks
Assuming you only have a few sheets to look through, you can do this quite simply with nested IFERROR statements. IFFERROR first attempts to perform a calculation - if that calculation is valid, it returns the value. If that calculation results in an error, it returns an alternat result as specified by you.
You can use this to check through each sheet, cascading down to the subsequent sheet each time it fails to find a match, as follows [Note that I have adjusted your INDEX to pull the value from column D of any sheet where column B from that sheet matches A6 on the current sheet. This may not be exactly how you want it to pull]:
=IFERROR(INDEX(Sheet2!D:D,MATCH(A6,Sheet2!B:B)),IFERROR(INDEX(Sheet3!D:D,MATCH(A6,Sheet3!B:B)),IFERROR(INDEX(Sheet4!D:D,MATCH(A6,Sheet4!B:B)),""))))
This first tries to grab column D from sheet2 where A6 is found on column B from sheet 2; if it errors, it then tries sheet 3, and if that errors it then tries sheet 4. If no match is found in sheet 4, it provides a blank response.
In case you have not solve this yet. Try...
=IF(ISERROR(MATCH(A6,(INDIRECT("'"&"Sheet2"&"'!"&B:B)),0)),"",INDEX(INDIRECT("'"&"Sheet2"&"'!"A:A),MATCH(A6,(INDIRECT("'"&"Sheet2"&"'!"B:B)),0)))
or type the sheetnames in A1 and Range in B1 then reference them
...indirect("'"&A1&"'!"&B1)...
then you can just change the value in A1 or B1 to make it dynamic :)

How do I automatically update cells to match values from another sheet when one cell is changed using data validation?

I have a list of items on Sheet 1 with the names of each item in column A and then further information in the subsequent 5 columns.
On Sheet 2, in each of the cells of column A, I have set it so that I can pick any item from a dropdown list using data validation. I want the subsequent cells in the row to automatically assume the value of the respective cells in Sheet 1.
So if in Sheet 2, Cell A1 I select Item 3 (which is in Cell A3 on Sheet one), I want Cell B1 on Sheet 2 to have the same value as Cell B3 on Sheet 1.
I could get the result I wanted by using =IF($A3='Sheet1'!A3,'Sheet1'!B3,) and then adding each possible item but that seems really long winded and would require adding to the formula every time I added an item.
Any idea if there is a way of doing this? Sorry if my explanation is a bit confusing. My excel knowledge is not great!!
Thanks in advance
Use the Vlookup function
Next to your data validation cell, enter (assuming the first sheet called Sheet1):
=Vlookup(a1,Sheet1!a:f,2,0)
This will return the data that match for the 2nd column. For the 3rd use:
=Vlookup(a1,Sheet1!a:f,3,0)
And so on..

Resources