Can Do Two Way Lookup To Extract Data In Excel?
Dec 2, 2011
VLookup function, formula that will allow a user pull up data either by name or an ID number. Heres a scenario:
Cell (C5) requires user to input "name" of employee being search. Cell (H5) if you do not know the correct spelling then use their ID number. The array is called "agentlist" which contains Name, ID #, hire date, SSI, title, and personal address.
Here's the formulas that I came with but it returning with a "n/a" response.
(B12) =IF(C5"",AND(H5=""),VLOOKUP(C5,agentlist,2,0),"unknown")
(E12) =IF(C5"",AND(H5="")*VLOOKUP(C5,agentlist,7,0),"unknown")
(G12) =IF(C5"",AND(H5="")*VLOOKUP(C5,agentlist,4,0),"unknown")
(I12) =IF(C5"",AND(H5="")*VLOOKUP(C5,agentlist,2,0),"unknown")
(L12) =IF(C5"",AND(H5="")*VLOOKUP(C5,agentlist,9,0),"unknown")
The cells within paranthesis are the locations were the data will be displayed. Am wondering if I would need two different arrays, one to locate by name and the other by their ID number? Hope this problem is clear.
a1bc1c4e1f1g1h1i1j1k1l1m1n1a2a3search by:a4a5name:Victor SuarezID:a6a7a8a9a10Employee Informationa11a12#N/A#N/A#N/A#N/A#N/Aa13nameTitleHire dateSSIAddressa14a15a16a17a18agentlistID #named
[Code] ......
View 4 Replies
ADVERTISEMENT
Feb 28, 2014
I am looking for VBA code to extract data from each tab into master tab based on data.
I have 3 tabs (inputs)
Tab1 (Dept A-NAME) (RANGE B4:I7)
SL NO
ID
Date
Customer
Start Time
End Time
Trucks
Supervisor
1
A
2/25/2014
Customer 1
10
1
3
ABC
[Code] .....
Tab 2 (Dept B-NAME) (RANGE B4:I11)
SL NO
ID
Date
Customer
Start Time
End Time
Trucks
Supervisor
1
B
2/25/2014
Customer 3
10
1
3
RTY
[Code] .......
Tab 3 (Dept C-NAME) (RANGE B4:I7)
Is it possible to run vba code to get below result in new tab
SL NO
ID
Date
Customer
Start Time
End Time
Trucks
Supervisor
Result
1
A
2/25/2014
Customer 1
10
1
3
ABC
Dept A
[Code] ......
Condition here is date 2/25/2014, is possible when running code message box pops up to ask date, when we give conditional date it extracts those dates.
Excel -2007 & Windows 7
View 7 Replies
View Related
Jun 3, 2014
I'm trying to extract data from one excel to another. I'm able to extract data without a problem copying cell to cell or a count, but I'm not able to get a return by calculating the sum. There must be a way?
.Range("A1").Value = Sourcesheet.Worksheets(1).Range("C10").Value
.Range("A2").Value = Sourcesheet.Worksheets(1).Range("D1:D10").Count
.Range("A3").Value = Sourcesheet.Worksheets(1).Range("D1:D10").Sum
First two lines work like a charm, but not sure how to tackle the third.
View 2 Replies
View Related
Dec 9, 2011
I'm tasked with looking up part numbers in Epicor's ERP database and entering the labor cost into excel. Is there any way to write a macro or VB program that lokks at the part number in excel, goes into epicor, pulls finds the part number and cut and pastes the cost data.
I have about 30,000 of these to look up.
View 1 Replies
View Related
Apr 27, 2012
A B C D E F
Cust Cust ID $ Items File SentFile Confirmed
Bank a1a $50,000.00 1008:00 PM
Bank b1b $51,000.00 2009:00 PM
Bank c1c $50,000.00 30010:00 PM
Bank a1a $53,000.00 40011:00 PM
Bank e1e $54,000.00 50012:00 AM
Bank f1f $55,000.00 6001:00 AM
I use a report daily at work that is filled in during the day; I'm wanting to minimize some of the work to be more efficient. VBA to search a particular folder in outlook (ex: inbox - cust info ) and search within those emails to verify 3 items match (Cust ID / $ / items) before extracting data and putting it into column F for that item. For instance, bank a and bank c have $ values that match, but the other criteria dont - Cust ID and items. Also is there a way to attach a copy of that email to the spreadsheet, say in column G, it doesnt have to populate in the spreadsheet, but maybe the attachment will open even 6 months down the road? I am worried that a link will eventually get lost if an email is erased.
View 2 Replies
View Related
Feb 12, 2014
Extracting data from an excel file, the data needed in lies in one column.
in this line
<GPSPosition pntRef="GPS_Auto_0080" wgsLatitude="33.334329659885" wgsLongitude="44.405736558207" wgsHeight="27.615921">
i need to get a table with three columns shows
wgsLatitude, wgs Longitude , wgsHeight
33.334329659885 ,44.405736558207 , 27.615921
etc
and get rid of all other information
this is an example of the how the file look like
---------Column N -------------------
</Feature>
</GPSPosition>
</GPSSetup>
<GPSSetup id="GPSSetupID_18" GPSReceiverDetailsID="GPS_1" antennaHeight="1.660000" stationName="GPS_Auto_0080">
<GPSPosition pntRef="GPS_Auto_0080" wgsLatitude="33.334329659885" wgsLongitude="44.405736558207" wgsHeight="27.615921">
[code].....
seems from above that there are too many data not needed the only thing need to be exracting is one lies of GPSPosition Line.
View 2 Replies
View Related
Dec 17, 2011
[URL]
My Excel Spreadsheet has columns named "Hospital Name | Overview | Address | Phone | Fax | Contact Person 1 | Contact Person 1 Title | Contact Person 2 | Contact Person 2 Title | Contact Person 3 | Contact Person 3 Title"
There is the list of hospitals starting from "Abbott Northwestern Hospital". I have two things in my mind to extract the information. If you click on the first hospital name "Abbott Northwestern Hospital". Below is an example text which I would like to transfer it automatically in columns given above;
This text should go in column named "Overview":
Abbott Northwestern Hospital bring twins into the Twin Cities -- along with triplets, quadruplets............
This text should go in column named "Address": 800 E. 28th St.Minneapolis, MN 55407
This text should go in column named "Phone": 612-863-4000
This text should go in column named "Fax": 612-863-5667
This text should go in column named "Contact Person 1": Jeffrey D. (Jeff) Peterson
This text should go in column named "Contact Person 1 Title": President
This text should go in column named "Contact Person 2": Daryl Schroeder
This text should go in column named "Contact Person 2 Title": VP Operations
This text should go in column named "Contact Person 3": Sandy Schmitt
This text should go in column named "Contact Person 3 Title": VP Strategic Development, Allina Hospitals and Clinics
View 9 Replies
View Related
Nov 15, 2013
Can VBA be used to extract a table from a website and output it on an excel sheet?
Basically we have to log in to a website and type data to our spreadsheet which is a bit tedious from the table on the website.
I'm guessing this can be done in some way but us having to enter username/password on website first to get to page we want will probably cause an issue would it?
View 1 Replies
View Related
May 5, 2014
[URL]
You can download the excel from the above link.
This excel includes some text data, in each cell there is an email address along with additional text. I only want to get the email addresses from the entire data.
View 5 Replies
View Related
Jul 24, 2014
i want to compare two excel sheets and extract common data in either sheet. For eg: If sheet 1 and sheet 2 contains some common data, i need to compare or lookup or whatever i do but i need to pull out that common data in sheet 2.
View 3 Replies
View Related
Apr 16, 2012
What I am trying to do is extract all the data from a excel database based on criteria. When i specify the site and month I need to pull all the corresponding data and write it to a worksheet. Below is an example. I am not allowed to show all the data it is confidential.
Site Date Operator Month
Chicago 12/3/11 Daniel December
San Jose 4/8/12 Mike April
New York 4/8/12 John April
View 1 Replies
View Related
Aug 7, 2012
In the past, elements were more or less fixed and was able to use my very well known method QueryTables under Workbooks.open
This website below has a "div", called "div.sidemeta" wihick contains the information I want to grab. [URL]
I have tried a different alternative:
Sub Test()
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Navigate "http://www.webiste.com"
[Code]....
The data I get under "IEdoc.body.innerhtml" does not show that particular DIV. I have tried using getElementById,getNamedItem and getElementByName without any luck.
View 9 Replies
View Related
Dec 20, 2012
I'm trying to download an Excel file from the internet and then extract data out of it. The problem is that I don't get any errors, yet the file downloaded is only 1kb in size. The extraction bit works, but the file is empty. The actual file is size 350KB.
Code:
Sub ExtractDataTest()
Dim FileNum As Long
Dim FileData() As Byte
Dim MyFile As String
Dim WHTTP As Object
On Error Resume Next
[Code] ....
View 1 Replies
View Related
Jan 15, 2014
I am looking to import data in text file to Excel sheet. Here is the main catch - All the data are not of fixed length and are in multiple lines as in the example below.
Text File:
ID001 Dr Dang 01012011 Male
USA Married 123
Below is how I expected the data extraction in Excel:
ColumnA ColumnB
CardID ID001
Name Dr Dang
DOB 01012011
Sex Male
Country USA
Status Married
Pin 123
View 3 Replies
View Related
Jul 5, 2013
I am looking to take information from a document emailed to me in word and then populate the specific ranges in my excel spreadsheet for invoices. What is the best method for doing this and how can i control where it comes from the position in the document and the range is going to.
View 1 Replies
View Related
Mar 28, 2014
I have a folder with multiples excel sheets
Destination : C: Project CustomerExcel
I would like to extract and compile the information contained in these cells:
a5,c5,a6,c6,c7,a14,g14,e16,g16,e18,i18,a20,g20,h22,j22,h24,l24 all the sheets.
New sheet would contain the information of each sheet eg. Column A2= file name
And Row B2 to R2 or whatever will be the corresponding cells mentioned above for each cell. The code I have only brings back the file name but only a5 from the range but not the rest.
VB:
Sub MergeAllWorkbooks()
Dim SummarySheet As Worksheet
Dim FolderPath As String
Dim NRow As Long
Dim FileName As String
Dim WorkBk As Workbook
Dim SourceRange As Range
[Code] .....
View 5 Replies
View Related
Dec 2, 2008
I am building a template which needs to pull values from an excel sheet that
will be copied and pasted into one of the worksheets in the template. These
values are always in the same columns but not always in the same row as the
length of the file varies. One of the main problems I am having is that there
these values are sums (located at the bottom of the table) but they do not
have any indicator in the first column (it is blank so I cannot use vlookup).
Also there may be multiple tables (each under the privious one) and in this
case I need to be able to extract the sum of each of the sum value for each
table.
Also, I was thinking of taking another route. Instead of looking up the
already calculated sum values I was thinking there might be a possibility to
sum the values my self and pull that value for the columns needed into my
template. The first lign of each table begins with "Asgn" and ends with "End"
and I was wondering if there is a way to sum the values between (and
including) these two markers for the columns needed.
View 4 Replies
View Related
May 18, 2012
I'm working on an Excel based product. As part of the security process I would like to require the user to enter a product id key into excel. Then the spreadsheet would compare the entered value to some kind of online database to verify the id key is valid. Finally, the spreadsheet would update the online database so that the id key is no longer functional. How easy is this to do?
I know verifying that the id key is valid is fairly simple.
Here is my biggest issue: How to get Excel to update the database and of course what form would this database take. Maybe its a table on a webpage, or google docs. Again the issue is how would I be able to update the table.
View 1 Replies
View Related
Jan 21, 2009
My company use a program called Bartender which is a barcode printing program. Bartender has the ability to extract information from an Excel sheet which is really useful and prevents repetetive keying in of information. We have found that if you simply print the Excel sheet when Bartender next uses the file it says it is corrupt and simply copying the data into a new spreadsheet and resaving it as the same name does not resolve this issue.
View 3 Replies
View Related
Nov 27, 2008
I have a spreadsheet on a weekly data with diferent reference names
e.g.
101
101
101
105
105
101
101
109
109
114
114
101
101
what I want is a formula to lookup the numbers from above and only extract a number once
e.g
101
105
109
114
View 9 Replies
View Related
Feb 20, 2014
I work for one half of a joint venture & am responsible for planning & expediting. The other half does purchasing. The bi-weekly PO download reports I receive are less than useful. I have already written the code to delete undesired sheets & add, format, and enter headers for a "Summary" sheet.
I need code to move to the next row, and run formulas to pull data from the next sheets, and repeat until there are no more sheets.
The number of sheets will vary from one download to the next, and the sheet names will vary from one download to the next.
Following are example formulas that need to be run on successive rows while pulling from successive sheets.
I am running Excel 2013 on Windows 8.1
View 14 Replies
View Related
Jul 29, 2008
I am trying to use lookup function to lookup for data in another table (we call it table A). Unfortunately, whenever the code is not in the table A, Excel will return the data from the previous row.... is there any possible way to prevent this... in another word, if the code does not exist in the table A, I want Excel to return 0 or some other figures.
View 9 Replies
View Related
Nov 28, 2006
here is an example....
(this is on a sheet called Summary)
----A--------B --------C------- D
1Names----At Bats----Hits----Batting Average
2Tom-------38--------31------.816
3Derek------19--------14------.737
4Joey-------40--------28------.700
5Chris-------40--------27------.675
6Chuck------37--------24------.649
Using the LARGE function, Excel has created a list based on batting averages(on a separate sheet called Line-up). It looks like this.....
---A----------B
1Names----Averages
2 -----------.737
3 -----------.700
4 -----------.675
5 -----------.816
6 -----------.649
The problem I am having is figuring a way for Excel to also bring the corresponding names (after using the LARGE function to create the line up list).
View 3 Replies
View Related
Jun 12, 2007
I have a very large spreadsheet of customer information(I call it the master spreadsheet). Each row contains only 3 things: Account number, product bought, Price
Later I receive the money from the customer for that product(the pay sheet) that contains the exact same thing in the same order: Account number, Product bought, Price paid.
What I'm trying to do is compare the two spreadsheets so that when i receive the pay sheet of cusomters who have paid with the amount it will deduct it from the master sheet.
So it should compare account numbers when it finds a match then it should subtract the amount paid (column C) from the master spreadheet price column(column C also).
sometimes customers don't pay the right price so it has to be a subtraction so I can see if it was over paied, underpaid etc.
Right now I'm still doing it manually combining the two documents sorting it by account number and checking for matches in column A (account number).
View 5 Replies
View Related
Jan 28, 2009
In my workbook I have multiple sheets but I'm attaching a very simple workbook to demonstrate what I'm trying to accomplish. In my "Lookup" tab/sheet. I want to have known Latitude and Longitude data that will exist in columns A&B. Columns C & D will have address numbers and Street Name. I would like my lookup formula to find the longitude and latitude data from my "lookup" sheet, when the matching address information is typed in, in my 2009 sheet. I have to keep the street numerics and street name separate on this worksheet as well. I believe I'll need two separate lookup formulas as I need these formulas to start in cell G4 & H4 in my "GeoCoding1" sheet. Is it possible to have four columns of data to be viewed in a lookup formula? I tried this formula in cell G4 (GeoCoding1 sheet)
View 3 Replies
View Related
Aug 22, 2013
I have a database in sql server i want to make a excel form where in a user will enter the data and print the excel file
E.g.
S.NoDESCRIPTIONPART NO
I want a user to write the item description and data should come directly from database .
View 4 Replies
View Related
May 21, 2014
Is there any way to create a specific template that will extract information from PDF file and make it to an Excel File ? The Template would know each PDF and will know which information to extract to excel ?
View 1 Replies
View Related
Feb 14, 2014
I am inserting .xls file here : text from picture.xls
In this file i have a ( picture in which some text are mentioned).
Basically this is a code i want that code will be get in cell f1 as a text.
So is it possible to get text from a picture.
View 4 Replies
View Related
Oct 8, 2012
Let say that i have this excel file that contains column of account number, the name of the customer, and the payment made.
And I want to extract any of the data that have duplicate. And the script should be able to get the duplicate only if those account numbers, the name of the person and also the payment have been duplicated. If let say only account number is duplicated, then it is not considered duplicate. refer the screenshot below :
View 7 Replies
View Related
Apr 18, 2013
So I have this problem in excel with comparing 2 columns.
Basically, I have 2 columns(a &B) that I need to compare with one another and find out the matching data. I am trying to use that matching data to enter in our reports.
Both columns might have duplicate items because I am dealing with premium numbers.
Formula to compare these 2 columns and find the matching data and extract it to a separate column. Keep in mind, i am dealing with almost 20,000 lines of data.
View 2 Replies
View Related