Compare lists with a function and no empty cells between - excel

I want to compare 2 lists in excel. Each is on a seperate Worksheet. The output need to be a list like in Difference.
I can use Excel only without VBA. Someone an idea how to solve this :S
My problem is that i dont know how get Peter and Fabienne without the empty cell between.

Try FILTER() formula if you have Excel-365
C7=FILTER(A2:A4,D2:D4<>A2:A4)
D7=FILTER(B2:B4,E2:E4<>B2:B4)
You just need to add sheet reference to compare with Sheet2 like
=FILTER(A2:A4,Sheet2!D2:D4<>A2:A4)

Related

In Excel, is it possible to construct an array with formulas inside it?

In Google Sheets, it's possible to create an array with formulas with in it. For example, ={SUM(1,2);SUM(3,4)} evaluates to a column with the numbers 3 and 7.
When I try the same thing in Excel, I get a formula syntax error. Is a similar thing possible? I've also tried putting names defined with LET in an array, but that throws the same error.
Thanks!
You can use CHOOSE function to combine formulas in array:
=CHOOSE({1;2},SUM(1,2),SUM(3,4))
formula works for O365, for earlier versions select desired count of cells and enter formula in first cell as array formula (with CSE).

Returning all values with certain criteria

I need help with creating excel formula. I have a list of names in row 1 and list of values in row 2. I need a formula that would return all of the names from row 1 that has a certain value (lets call it "value1") in row 2. I know how to do that with VBA but I would rather avoid using macros if possible. I'm pretty sure it would be possible with array formulas but I'm not really good with it so I would appreciate a help.
Something like this:
=IFERROR(INDEX($1:$1,AGGREGATE(15,6,COLUMN($A$2:$D$2)/($A$2:$D$2="X"),ROW(1:1))),"")
As it is copied down the selection will change.

Using nesting vlookup formulas for use in automation code

I am trying to write a formula that uses different vlookups depending on whether the formulas produce errors or not. I have 3 tabs, each with 3 columns.the first two columns contain values that are in the vlookup, with the third colum containing the value I want to find. Basically i want a formula that will use different vlookups depending on whether the lookup value is found in teh first tab or the second . Below is the formula i am working with. It works to bring in values from Sheet1 into Sheet3, but doesnt work when the values are in Sheet2. Also will be inserting this formula into vba code for automation use.
=IF(OR(ISERROR(VLOOKUP(B2,Sheet1!B2:C19,2,FALSE)),ISBLANK(VLOOKUP(Sheet3!B2,Sheet1!B1:C19,2,FALSE))),IF(OR(ISERROR(VLOOKUP(Sheet3!A2,Sheet1!A1:C19,3,FALSE)),ISBLANK(VLOOKUP(Sheet3!A2,Sheet1!A1:C19,3,FALSE))),IF(OR(ISERROR(VLOOKUP(Sheet3!B2,Sheet2!B1:C21,2,FALSE)),ISBLANK(VLOOKUP(Sheet3!B2,Sheet2!B1:C21,2,FALSE))),IF(OR((ISERROR(VLOOKUP(Sheet3!A2,Sheet2!A1:C21,3,FALSE))),ISBLANK(VLOOKUP(Sheet3!A2,Sheet2!A1:C21,3,FALSE))),"non",VLOOKUP(Sheet3!A2,Sheet2!A1:C21,3,FALSE)),VLOOKUP(Sheet3!B2,Sheet2!B1:C21,2,FALSE)),VLOOKUP(Sheet3!A2,Sheet1!A1:C19,3,FALSE)),VLOOKUP(Sheet3!B2,Sheet1!B1:C19,2,FALSE))
it returns the value sI am looking for up until the lookup values start occuring in Sheet2. At that point it shows me "non".
Any help would be greatly appreciated! Thanks
Your first VLOOKUP does not reference "Sheet3".
I think The below equation does what you are looking to do (assumes you are on Sheet3).
=IF(IFERROR(VLOOKUP($B$1,Sheet1!A:C,3,FALSE),"")="",IF(IFERROR(VLOOKUP($B$1,Sheet1!B:C,2,FALSE),"")="",IF(IFERROR(VLOOKUP($B$2,Sheet2!B:C,2,FALSE),"")="",IF(IFERROR(VLOOKUP($B$2,Sheet2!A:C,3,FALSE),"")="","nan",VLOOKUP($B$2,Sheet2!A:C,3,FALSE)),VLOOKUP($B$2,Sheet2!B:C,2,FALSE)),VLOOKUP($B$1,Sheet1!B:C,2,FALSE)),VLOOKUP($B$1,Sheet1!A:C,3,FALSE))

Excel formula to prevent duplicate name entries

I am creating a work chart for a project with excel table. However with so many people to manage I have ran into an issue of often putting same person twice on different columns of the same row (he/she can't work on two places at same time!)
So, I am looking for help with a formula that notices if the same name appears twice on a row but does not count multiple blank cells as duplicates. My understanding of excel is very basic and so far I have managed to get this far
=COUNTIF(A6:W6;A6:W6)=1
which returns to me with false, which I assume is because of the blank, unfilled cells still within the table being counted as duplicates.
Help would be appreciated, thanks.
You can't have a range as the second argument of a Countif. The range you pass into the formula will resolve to just the first value. Use the Evaluate Formula tool to see what I mean.
If you want to determine if ANY name in the range A1:W1 appears more than once (and exclude blanks), you will need a recursive function. That can only be done with VBA, not with a formula.
You could use a Countif in a conditional format to highlight duplicate names in a row. That's a piece of cake. Pipe up if you want to do that.

A formula to copy the values from a formula to another column

I have a column of values created from a formula, I know I can copy the values over to another column by using the clipboard. BUT...I want my spreadsheet to be automatic whilst avoiding the use of VBA coding, so it would be ideal if I could create a formula for the next column which copies the VALUES over to the next column. Maybe an INDEX/MATCH kind of method but one that copies ONLY the values rather than the formulas.
So in essence I want a formula to copy the values from a formula....
You can use =A4, in case A4 is having long formula
Use =concatenate(). Concatenate is generally used to combine the words of several cells into one, but if you only input one cell it will return that value. There are other methods, but I find this is the best because it is the only method that works when a formula, whose value you wish to return, is in a merged cell.
For such you must rely on VBA. You can't do it just with Excel functions.
you can use those functions together with iferror as a work around.
try =IFERROR(VALUE(A4),(CONCATENATE(A4)))
What about trying with VLOOKUP? The syntax is:
=VLOOKUP(cell you want to copy, range you want to copy, 1, FALSE).
It should do the trick.
Copy the cell. Paste special as link. Will update with original.
No formula though.

Resources