excel 2007, assign value in column C where column A matches column B - excel-2007

I have an excel worksheet with columns A, B, C...columns A and B have some matching values. Column B and C are grouped together meaning the cells correspond to each other and now I want to assign whatever is in C where A matches B. I hope this makes sense. I could do it in sql i guess but i do not want to export all the data.
for example
Column B
http://alabama.scout.com
http://www.netmag.co.uk
http://dotnet.sys-con.com
Column C
UNITED STATES
UNITED KINGDOM
UNITED STATES
Column A
http://www.1tv.ru
http://alabama.scout.com
http://www.01net.com
http://www.ten-tenths.com
Column D
Ok so i need to insert in column D where A = B the value of C. Sorry just to be more clear column B values are assigned with column C values, so subsequently column A will be assigned with column D

How about:
=VLOOKUP(A3,$B$2:$C$4,2,FALSE)

=IF(A1=B1, "True", "False")

Related

Autofill multiple cells while filling one cell in Excel

The excel data looks like below:
Column A: Name
Column B: Role
Column C: Activity
Column D: Comments
Now in Columns A to C the entries are same and in Column D it is always different. Its like a timesheet of an employee.
So instead of filling Columns A to C the same, I want to put a formula such that when another entry in Column D is made, then Columns A to C are auto populated from the above filled data.
Please help.
You can create two tables using Format as Table:
If I understand you question right, you want to auto populate 2 different cells if a 3rd one is not empty.
Column A: Name
Column B: Role
Column C: Activity
Column D: Comments
Now in Columns A to C the entries are same and in Column D it is always different. Its like a timesheet of an employee.
Now in cells A to C add the following formula
=IF(NOT(ISBLANK(D1)),”Whatever you want in the cell”, “”)
What the function does is it looks if D1 cell is empty (you can also add ranges) and if it’s not; it adds “Whatever you want in the cell” to the cell holding the function; if cell D is empty, it leaves the holding cell empty
Alternatively, you can change the string to expression that fills your cell correctly

VBA code to sum total of like account numbers

I have a code that matches 2 columns A VS C for like account numbers. If numbers match than it finds if the amounts in Column B & D match. If it does it pastes the lines of data to another spreadsheet.
I am coding a statement to find the like account numbers in column A VS C, but if the amounts don't match in column B & D than it needs to find the like account numbers in column A and sum there amounts to see if it matches the amount in column B.
How would I write the code to collect the sum of the same account numbers in column A?
If Acct = MatchAcct Then
If Amount <> MatchAmount Then
If Acct = nonmatchacct Then
(sum the values in column B for the matched account #s in column A)
The code above says if the Acct (Column A account #'s) = MatchAcct (Column C account #'s) then if Amount (Column B value) doesn't equal MatchAmount (Column D value) then the code sees if Acct (Column A account #'s) equals nonmatchacct (any other account # in Column A). If the account # matches then I want it to sum those amounts in column B.

Order 2 columns by matching to another column

I have 4 columns in an excel file:
The two on the right have about 9000 rows, the 2 on the left have about 14000.
Column A and B are connected. Also, C & D are connected.
The THER_CLASS column is the 1st 6 numbers of the key column.
How would I order the left two columns by if the 1st 6 of the key matches THER_CLASS?
I want each row to take the A column find which row the 1st 6 # of GPI are equal and then move C and D to the row that A is on.
I could do this by building a console app in c# but I feel like there is a way to to it much easier in excel.
You're basically just looking up the "Category" of each "Item". As Flephal points out, you can do this with VLookup.
Add a column E with the header "CLASS" and a column F with the header "CLASS_DESC".
For column E, starting with cell E2 and filling downwards, use the formula "=VLOOKUP(Left(C2, 6), A:B, 1, False)"
For column F, starting with cell F2 and filling downwards, use the formula "=VLOOKUP(Left(C2, 6), A:B, 2, False)"
Really, it would make much more sense if you didn't have the two tables mashed up next to one another and instead had each one on a different sheet. For example, move A & B to another sheet and call it "CLASSES".

Comparing two lists of different length and returning data

I have a workbook with two worksheets F1 and F2.
On each, Column A is last names, Column B is first names, and Column C is department names. F2 lacks the department names.
I am trying to compare and match the names in F2 with the names in F1 and return the department names from F1's Column C to F2's Column C.
The difficulty I'm having is that F1's list is significantly longer than F2's list. Otherwise I could just do a simple comparing thing.
Thank you for any help.
So if we have data like this:
Sheet F1
A B C
----------------------------------
Last Name First Name Department
Bar Foo 1
Bar2 Foo 2
Bar3 Foo 3
Bar4 Foo 4
And we want this:
Sheet F2
A B C
----------------------------------
Last Name First Name Department
Bar3 Foo 3
You can use an array formula in column C (entered with Ctrl + Shift + Enter)
=INDEX(F1!C:C,MATCH(CONCATENATE(F2!A2,F2!B2),CONCATENATE(F1!A:A,F1!B:B),0))
Then fill down to suit
If you find the execution time to be too long for that formula you can narrow down the CONCATENATE range to your specific data. i.e.:
=INDEX(F1!C:C,MATCH(CONCATENATE(F2!A2,F2!B2),CONCATENATE(F1!$A$1:$A$5,F1!$B$1:$B$5),0))

Compare 2 columns in different workbooks and retrieve cell value from a third column

I have 2 workbooks in Excel 2010 book1.xls and book2.xls, Example book1:
A B C D E
880006729 5016211 John $0.000
From this workbook i only need Column B which is the Employee number and Column E which will be the place where i get the data from the other workbook
Example book2:
A B C
5016211 Canada Sales
In this book I have these main columns but I only need column A and C. Both workbooks have more than 1000 rows im just showing and example of the data.
My goal is to search the value from book1 Column B (Employee Number) in book2, after it finds that specific number get the value in column C and paste it in Column E book1, In few words, I want to know which Business Unit each employee belongs to.
NOTE: book1 table can contain more than 1 row with same employee number, of course if this happens just repeat the word "Sales" using as reference the tables above.
the final table would look like this...
A B C D E
880006729 5016211 John $0.000 Sales
IN COLUMN E of book1.xls enter this formula and drag it down:
=VLOOKUP(B1,[Book2.xls]Sheet1!A1:C1000,3)
Change the A1:C1000 to the range that has all the values in book2