looking for excel formula combining columns and rows - excel

Imagine a spreadsheet with 4 columns: A B C D
If the B column is equal to D column, I want in column A the result of column C
for example: if B2 is equal to D2, A2 value should be C2 value
if not equal it should show empty or false or something
I have uploaded a sample spreadsheet
What is the formula to use?

In cell A2, simply put:
=IF(B2=D2,C2,FALSE)
And fill down for the other rows.
The logic should be simple enough to understand. And you can type in something else instead of FALSE if you want.
EDIT:
As per amendment of problem:
First move the column D before column C (meaning Email will be in Column C and Log will be in column D)
In cell A2, put the formula =VLOOKUP(B2,C:D,2,0)
Fill the formula down.

This would go in A2.
=IF(B2=C2,C2,"")

Related

Check if a cell value is found in a column where cells may have multiple values then return a third cell value

I am trying to check whether the value in each cell within Column A is in Column D. Some cells in Column D have multiple values within a single cell. If the value of Column A IS found in Column D then I want the formula to return what's in Column B (value next to Column A that matched).
Try:
Formula in C2:
=IF(SUMPRODUCT(--(ISNUMBER(SEARCH(A2,$D$2:$D$5))))>0,B2,"")
Drag down..
If you are looking at just row by row analysis then try this:
=if(iserror(search(a2,d2)),"",b2)
if you are trying to match any row in D then I suggest breaking out all items in D into an item per row and then doing a VLOOKUP
Can you copy column B to Column E? If so,
=Vlookup("" & A1 & "", D:E, 2,0) and scroll down.
If not, a similar index(match( function will work with a wild card. (*)

Is there a formula to line up column rows based on cell value or partial value?

I have a sheet with 4 columns, see screenshot_1
Column A - word
Column C - word (column A) + extra word
The rows of Column A and column C and their values (column B and D) are not lined up. As you can see in the screenshot,
I want to place C2 And D2 on line 29, C3 and D3 on line 15, etc. So column C and D are filled with the matching word of column A (if it exists).
Resulting in something like screenshot_2
Is there a formula to line up column rows based on cell value or partial value?
Screenshot 1
Screenshot 2
You can achieve this by using wildcard in Vlookup. Enter this formula =VLOOKUP("*"&A2&"*",$F$2:$G$26,2,FALSE) in column C.
Possibly the easiest solution would be to keep columns A and B untouched, and have column C automatically display "used (whatever)" if column D contains a number.
To accomplish this, type the following formula into cell C2 and drag down:
= IF(ISNUMBER(D2),"used "&A2,"")
First, separate the ranges with some empty columns; so column A & is the same, C is empty, D & E are a not connected
Create a new column in the empty C column:
=IFERROR(IF(MATCH("*"&A2&"*",F:F,0),VLOOKUP("*"&A2&"*",F:G,2,0),""),"")
See this Example

how to find a cell value where cell number depend on another cell value in excel

I want to store the value of Column B Cell B20 in Column F cell -- .
Column F cell will collect the 20 value from a formula in Column E cell E2.
So in Column F i want use a formula like : B(E2). this formula will collect the value from B20 to the F column cell.
I am working with multiple sheets with more than thousand data.
It would be a great help.
Please help.
Try this formula in column F
=INDEX(B:B,E2)

Compare a single row with a column and extract the value from another column on the same row in Excel

So I'm looking for a formula or anything that does something like this:
I have 4 Columns. A B C D.
I have a column (A) with multiple values that can have duplicates.
A1: A
A2: A
A3: B
A4: C
A5: C
I want to compare each row with a Column (B) that has one of each value. So B1 = A, B2 = B etc.
However the value I want to extract to column "D" is in Column "C". So if A1 equals anything in the Column B, I want to extract the value in Column C on the same row, to Column D.
So in D1 I want the value from C1. In D2 I want the value from C1 as well. But in D3 I want the value from C2.
This seems to work:
=VLOOKUP(A1:A5,B1:C5,2,0)
Entered as Array Formula in D1:D5 using Ctrl+Shift+Enter.
Result:

MS Excel inverse lookup

I have two sheets with three columns each. I need a third sheet in which I have all rows that are in sheet two but not in sheet one. Is there a formula to do this?
Here are the formulas in separate columns (for clarity). You may combine them, of course.
I used columns in a worksheet instead of separate worksheets, but the concept carries over.
Column A Column B
a d
b e
c f
d g
e h
These are A1:B6. Your data under examination are A2:A6 and B2:B6.
If I understand your question, you are looking for "f, g, h" Those are the rows in column B that are not in column A.
In C2, I place the formula =MATCH(B2,$A$2:$A$6,0). The $A$2:$A$6 means use the absolute column and row and does not change when I copy the formula down to C6. The 0 means I want an exact match.
This will put a 4 and 5 in cells C2 and C3, but #N/A in C4, C5, and C6, because there is no match.
In D2, I place the formula =IF(ISERROR(C2),B2,""). Also copy this formula to column D6. If there is a number in C2, then the a match was found, and it prints a blank. If there is a #N/A in C2, then it prints the letter in column B.
In my small example, it prints f, g, and h.
Column C Column D
4
5
#N/A f
#N/A g
#N/A h

Resources