Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
Is it possible to look through the values in Col A and compare them to the values in Col B and when there is a match, write the value from the same row in Col C into Col D? Thank you, Cindi |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you may need to expand on what you want to do but from what you've
said: if you have 3 sets of values in colA, colB, and colC such as: A B C dog cat jeff cat dog sue dog dog andy and you want to display the value from colC in colD when the values in colA and colB match then put the following formula in the first cell colD and copy down: =IF(a1=b1,c1,<enter unmatch result here) HTH Rob |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've been sent an Excel spreadsheet with several columns of data one of
which contains the course numbers but what I really needed was the course ID in order to import this data into an Access table. Since I have an Access table with course numbers and their matching course ID, I exported those two fields of data into an Excel spreadsheet and then copied and pasted them into the original spreadsheet so it looks like this: Col A Col B Col C Col D ACCT1220 TEC1110 3 PHS2200 ACCT1220 1 TEC1110 PHS220 2 So Col C contains the matching ID to Col B. What I need is the matching ID to Col A placed in Col D like this: Col A Col B Col C Col D ACCT1220 TEC1110 3 1 PHS2200 ACCT1220 1 2 TEC1110 PHS220 2 3 At this point I would probably delete columns A-C because I would have the correct ID associate with the remaining columns (E-H) of data. I have not used Excel in years. In looking at the formula you provided is it possible to put a range in place of b1 to cover the entire column? Thank you, Cindi *** Sent via Developersdex http://www.developersdex.com *** |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
from what you've said, i think your problem is that you have an
un-useful identifier of your courses ('CourseNumber') in the spreadsheet. you would like to replace this CourseNumber with the more useful identifier 'CourseID'. if all your tables are in Access, i would suggest that you do the comparison in Access itself rather than copying the data into Excel. You should be able to import your new spreadsheet and then create a query which includes all the data from the spreadsheet and the CourseID field. However, if you are happier doing it in Excel then you should use the VLOOKUP function (search Excel Help for more). Using what you've described above as an example: copy the CourseNumber and CourseID fields from the table into your original spreadsheet (you should be able to just copy and paste rather than export etc.). Assume here that this data is on sheet 'Course' and is in range A1:B10. Make sure the CourseNumber field is on the left because this is the column you want to 'lookup'. the CourseID field should be in the column next to it. then if the CourseNumber in your original dataset is in colA, insert a new column (colB) and in that column put the following formula: =VLOOKUP(A1,'Course'!A1:B10,2,FALSE). Rob |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
So cols b & c map a course id to a course name.
How bout this in d1 then copy down: vlookup(A1,$B:$D,2.false) (thats an unusual set of data) "Cindi S" wrote in message ... I've been sent an Excel spreadsheet with several columns of data one of which contains the course numbers but what I really needed was the course ID in order to import this data into an Access table. Since I have an Access table with course numbers and their matching course ID, I exported those two fields of data into an Excel spreadsheet and then copied and pasted them into the original spreadsheet so it looks like this: Col A Col B Col C Col D ACCT1220 TEC1110 3 PHS2200 ACCT1220 1 TEC1110 PHS220 2 So Col C contains the matching ID to Col B. What I need is the matching ID to Col A placed in Col D like this: Col A Col B Col C Col D ACCT1220 TEC1110 3 1 PHS2200 ACCT1220 1 2 TEC1110 PHS220 2 3 At this point I would probably delete columns A-C because I would have the correct ID associate with the remaining columns (E-H) of data. I have not used Excel in years. In looking at the formula you provided is it possible to put a range in place of b1 to cover the entire column? Thank you, Cindi *** Sent via Developersdex http://www.developersdex.com *** |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Enter the following formula in column D and drag down to copy:
=IF(A1=B1,C1,"") Mangesh "Cindi" wrote in message ... Hello, Is it possible to look through the values in Col A and compare them to the values in Col B and when there is a match, write the value from the same row in Col C into Col D? Thank you, Cindi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|