Extracting Certain Data Depending On Criteria
Have a perfect working spreadsheet, but now need to extract certain bits of data depending on one criteria.
Each row contains data in different columns.
What i need to do is depending on the criteria of a cell (i.e. whether its Y or N) i would like to extract certain cells onto another worksheet all within the smae work book
i.e for example
If i have columns A,B,C,D,E and F and then x amount of rows (as these can change as data is entered) if a Y is entered in F then it extracts the data out of columns A, C and D
View Complete Thread with Replies
Related Forum Messages:
Find Data Depending On Two Criteria
I Have want two find the dates and the data of these dates
depending on the two criteria i have
note"the two criteria would be left(b3,4) and right (b3,4)
in f3"date" i want to find the dates correspond with these two criteria
and then find the data of these dates in G3 Depending on the two criteria too.
Criteria1Criteria2DateResult31/1/2008M111 GG1G M113
M191M1131/2/2008M191 G1GG M11341/2/2008M191 G1GG M113
1/5/2008M191 G78GG M11351/2/2008M111 GG1G M113
1/8/2008M191 G1G9G9 M11361/3/2008M141 GG5G M113
71/4/2008M118 GG6G M113
81/5/2008M191 G78GG M113
91/5/2008M141 GG5G M113
101/6/2008M111 GG2G M113
VBA Code For Extracting Data From A List As Per Given Criteria
Suppose I have a list of data in which I want to retrieve or extract specific row from the list as per operator name & relative comments (Done or Not Done) from the given list as per the operator name, now what I want that my VBA code should be able to get the operator name & the relative comment data from the list according to the operator name in a new sheet. My data keeps changing so I need a code which can work on any size of the data. I need to retrieve only operator name & Comment column in a new sheet to run my Pivot table.
My Excel data is something like in the attachment & the result I want through VBA Code.
Extracting Data From A Table According To Specific Criteria
I'm using Excel 2007 and I'm looking for a way to extract certain records/rows from a table and to have that data copied to another area of the spreadsheet. I actually want to extract Invoice amounts according to a specific account number so that I eventually end up with all the invoices for a particular client on another tab so that they can be printed out as a kind of client statement.
I know there are ways to filter and then copy the records/rows to another tab but I want it to be automated as far as possible. What I really want to do is to "pull" the records into a new tab by using some kind of formula in the cells where I want the data rather than having to copy it there. I know how to sum data for this kind of thing but what I'm really struggling on here is being able to "Display all the records in a seperate area" first before I eventually add formulas to sum.
I don't mind the records being coppied if the process is automated but don't really want to get into macros as writing macros isn't my strong point.
I've tried using "VLOOKUP" but it will only return values for the first data item it finds (Account number in my case), whereas I really need it to continue to return values for the data item it finds if there are multiple instances of it!
Extracting Data From A Table - Multiple Criteria
I have a data table that has the following structure
Team manager Warrington 10 12 14 16
Team manager Liverpool 8 10 11 12
Commercial Manager Warrington 25 28 32 33
I need to extract the data out into a flexbible summary table where i can choose the job title, location and year.
I can use the following index / match formula to extract the salary that matches the job title and location.
(INDEX('Emp In'!$c$5:$c$130,MATCH(1,('Emp In'!$A$5:$A$130=$B3)*('Emp In'!$b$5:$b$130=$C3),0) - Where b3 = job title, C3 = location, Column C = Salaries year 1
However I cannot add the flexibility to choose a year as this formula fixes the index on a chosen column (yr 1 column C is this instance)
Copy Columns Depending On Criteria
I have attached a spreadsheet.
I have a dump of about 4000 calls (I have minimised the attachment for size sake) that I need to do certain reports on.
The second sheet (dump) has the data in its raw form from our call reporting tool. The 1st sheet (Report) is a broken down version the powers that be wish to see.
My formula needs to meet certain criteria, as you can see I only have 6 columns on the (Report) sheet where as the dump has lots !
The (report) sheet needs to list the Parent Case ID only if the Summary column has BSR at the beginning, if it meets this criteria then it lists the other relevant columns in the (report) sheet.
Extracting A Continuous List Based On Criteria
Is there a way I can get a continuous list, ie no missing rows, from a much larger list. (New list in separate columns to the R of the list.) I want to extract data from column A, only if the data in col C matches my specified criteria - I want this info to appear as a list with no gaps, ie I can do this easily using "If" but there will be lots of blank rows doing it this way.
Furthermore, as I need two different lists from the same data block, I need to specify whether number (extract these to col N) or text (extract to col O).
Extracting Rows Based On Date Criteria
I have a sheet of data, and i need to extract rows that contains dates containing 5 in them. Eg, 5 Jan, 15 Jan, 25 Jan... 5 May, 15 May, 25 May and copy them into a new sheet. Is there a faster way to do it via VBA rather than manually extracting them?
Finding The MAX In A Group Of Cell Depending On A Criteria
I'm trying to find a way that I could get the MAX value in a group of cells depending on a critieria. The situation is that I have a list of numbers and a list of dates parallel to it. I would like to find the MAX for, say, the numbers corresponding to the month of June. I would like to be able to change the month and get the MAX for each month on request.
I need formula that will give me "600" if the month I want is June. Ideally I would not want to have to filter the data, so SUBTOTAL would probably not work for me.
Sumproduct Formula Needs To Halve A Value Depending On Criteria
The current spreadsheets add up each persons totals by matching the name in each tab with the name of the person who won the job located in service orders tab. BUT.....If two salesman pair up on up on a job then the formula doesn't recognize the joint name. eg Scott/Ash in row 21 & 22 (Service orders). I need the totals to half the job and add it to the salesmans total accordingly.
Hide/unhide Columns Depending On Criteria
I am trying to hide or unhide columns E:BL depending if the the cell value in row 54 contains a value (Note cells in row 54 contain formulas). I have written the following code but get a runtime error on the else statement.
Application. ScreenUpdating = False
ActiveSheet. Unprotect Password:="LD"
Dim c As Integer
For c = 5 To 64
If Cells(54, c) = "" Then
ActiveSheet.Range(Cells(54, c)).EntireColumn.Hidden = True
ActiveSheet.Range(Cells(54, c)).EntireColumn.Hidden = False
ActiveSheet.Protect Password:="LD", DrawingObjects:=True, Contents:=True, Scenarios:=True
Application.EnableEvents = True
Macro To Lock Cells In Protected Sheet Depending On Criteria
I have a Workbook that I use to log invoices and credit notes and it is password protected so that the cells that contain formulas are locked and therefore not selectable.
What I wanted to know is. Is it possible to lock other cells depending on what values are in certain cells?
Let me explain. I have Columns G & H which contain the heading 'Credit Note Number' & 'Credit Note Amount'. Now in columns I & J I have the heading 'Invoice Number' & 'Invoice Amount' respectively.
What I have done is to make a condional formatting so that If I put a value in cells in column G it will change the colour of the adjacent cells in columns I & J, likewise If I fill in cells in column I the conditional formatting will change the colour of adjacent cells in coulumn G & H. This helps me to see whether a row contains a credit note or an invoice.
What I would ideally like is for a Macro that would automatically locks cells G & H in a particular row that I am currently working on if I enter data into the cell in column I. Likewise if I am entering data in column G in the row I am currently working on for a credit note, then lock columns I & J in the row I am currently in.
Any Ideas how this can be done? Also can locking and unlocking of cells be done in VBA while the sheet is protected or would the macro need to temporarily unprotect sheet, lock the cells then protect sheet again?
PS: I have uploaded a Jpeg of what my conditional formatting does to try and illustrate what it is I need.
Extracting Data From One Massive Worksheet To Split To Smaller Sheets Of Data
10/05/0808:30:00 AMValid Card EntryLamDoor 1
10/05/0808:31:00 AMDoor Leave Open Door 1
10/05/0808:32:00 AMDoor Closed Door 1
10/05/0808:41:00 AMValid Card Exit Yap Door 1
10/05/0808:46:00 AMValid Card Exit Lam Door 2
10/05/0809:14:00 AMValid Card EntryLam Door 2
10/05/0810:18:00 AMValid Card Exit Lam Door 2
10/05/0810:19:00 AMValid Card Entry Yap Door 1
10/05/0810:40:00 AMValid Card Exit Yap Door 1
10/05/0810:42:00 AMValid Card EntryLamDoor 2
11/05/0808:30:00 AMValid Card EntryLamDoor 2
11/05/0808:20:00 AMValid Card EntryYapDoor 1
11/05/0810:20:00 AMValid Card Exit Lam Door 1
11/05/0811:40:00 AMValid Card Exit Yap Door 1
the above is the data i need to work with (dates are in dd/mm/yy). i need to find a way (a macro, preferably) to extract the date and time corresponding to one person, and paste it into a new sheet, e.g. at sheet 2 (renamed to "lam") should be
10/05/0808:30:00 AM 11/05/0808:30:00 AM
10/05/0808:46:00 AM 11/05/0810:20:00 AM
Extracting Bad Data
I have two exported lists of data to compare from my newsletter program. One is the list of email addresses that I sent the newsletter to and the other is a list of the bounced email addresses.
Question: How can I extract the bounced emails from the list of sent email addresses?
In other words I want a list of clean, sendable email addresses.
Extracting Rows Of Data
I have a table of data on 20 employee performance stats for my department. It is in the format of col A names and corresponding values for multiple skills and performance data from Col B to M in rows. I have a worksheet for each employee within the workbook. What I would like to do is to be able to extract the individual row of data to each employee sheet. I have played with OFFSET but can't get it to work other than in a column..
Extracting Data From Different File Using VBA
i have file A3R-(345).xls, B1Z-(235).xls etc files inside folder called MyFolder.
another master file Master.xls which will extract data from files inside folder MyFolder.
what i need is to put values from file names inside Master.xls. It will loop through all files inside that folder and extract the numbers between ().
So column A in Master file will have:
How to do this using VBA? (only Master File should have the VBA code)
Extracting Data From A Calander
Let's say 1 Feb starts on week 5, 1 Mar starts on week 9 and 1 Apr starts on week 14. As such, feb has 4 weeks and march has 5 weeks. I have a spreadsheet of data on a weekly basis, and i want the data from week 5 to week 8 to be under feb and data from week 9 to week 13 to be under march. The data is to make a graph. Is is possible for excel to be linked to the calander so as to detect which month has 4 weeks and which month has 5, depending on the 1st of each month?
VLOOKUP Not Extracting The Data
I have a problem with VLOOKUP not extracting the data I need from 1 workbook.
I want to populate 4 different sheets in the "108" workbook with data from the "1st" workbook. I've uploaded the workbooks to show the formulas I have already. The data in "1st" workbook changes daily and can have upwards of 2000 rows. I've simplified the list for the example.
In the "108" workbook I want to fill in the first three columns with the formula down to about row 500.
I've tried different formulas to do this using EXACT, MATCH, and VLOOKUP but to no avail.
Extracting Web Data From A Sub Web Page
I am using the "CreateObject("InternetExplorer.Application")" method to extract data from a webpage. This webpage is a sub page that I cannot find the data for, even after filtering through all the ".document.all(x)" items? Any ideas on how to obtain this "sub page" data, since there is other data that I need which is on the "main" page? I don't want to have to call up this sub page separately since I'm already seeing it (physically able to view it on the main page but not able to extract it) from the main page?
Extracting Data From Table
I have table that has a list of agents (Colum B) and then corresponding appraisal dates; 3 Month (Colum C), 6 month (Colum D) and annual (Colum e).
What I would like to be able to do it to have something that looks at the table and tells me all the 'appraisals' that are due the same month we are in, and the date that it is due, as well as the 'agent' that is due the apprisal.
I have played with the INDEX MATCH formulas and also pivot tables but have not found a solution, is it something that is going to require VBA or is there a simpler solution?
Extracting Data Using INDEX
I am using INDEX functions to extract up to 2 items of data which I now need to extend to upto 6 items.
The spreadsheet shows a list of staff initials and a day by day work rota of (M)ornings, (A)fternoons, (N)ights and (O)ffs. What I am needing to do is to identify only those staff who are rosterred Off and to place those intials in the two sets of colored cells in rows 5 and 7.
The attached spreadsheet, Tester1.xls shows the 2 existing INDEX functions in use. These can only detect the first occurrance of "O" and the next. I now need to be able to extend this functionality to cover all "O"'s in both section 1 and section 2. So, eg if 12 Aug is input to B15, I can only select IB and GG, but I now want to be able to see MG in the next blue cell.
Extracting Form Data
I have many company-specific Excel files containing given data fields such as company name, company address, commodities supplied, etc. An example is attached here under the tab "Company Profile". I would like to extract all the information from the different "Company Profile" Excel files and put it into a more usable format, as shown in the attached tab "Results," where the company data runs horizontally across.
I tried to record a macro to do this ("CompanyProfile" -- included in the attached file), but I am not able to make it do what I want it to do. I also do not know how I may be able to capture the information in the "check boxes."
Extracting Number From My Data
how to get the function in excel 2007 for the following problem please . Col R i am cutting and pasteing from a web page info like this 1/1 or 13/14 or 9/10 . when i paste to my worksheet it comes out as 3-Mar or 10-Sep or 12-Dec , but everything 13 and above is coming out as per the web page eg , 13/14 or 15/15 . I am actually only wanting the first number or numbers to the left of the slash / mark , so col R2 might be 1/1 i want only the 1 to appear , 13/14 i want just the 13 and so on , they are only ever 1 or 2 digits ,
Data Extracting...Not Counting.
In one cell i have a dropdown. Depending on what is in that dropdown, i want a table of data to be written. I'm not too hot with pivot tables but my understanding is that is predominantly to do with counts. This is more of a multiple vlookup i guess. I want to pull from a list of data (3), all the cases matching the dropdown (1) and deposit into a list (2). What is the best way of doing this? I don't want to use filters. See attached.
Extracting Data From A String
I recently had to convert a text file to an Excel file. The text file had to be converted as delimited data since the fixed width column could not convert correctly.
Now that I have the data converted, I have several rows of data strings.
The data I have looks similar to the examples below:
41 AAITQ08082901PER0041 ABC v1.0 NES ABC P111 - Blue 7706 6547 Yes No 140 5 AAITQ08082901PER0005 ABC v1.0 NEG ABC Z113 - Silver R 9222 2743 Yes No 156123 My question is, how do I extract the numbers that follow the word "No" at the end of each string?
Assuming the data starts in column A, is there a formula that I could type into column B that would allow me to return the value of those specific numbers?
Extracting Specific Data From A Row
I have a sheet where each row contains the name of a customer and should also have an 8 digit account number, all in one Column. Some do not contain the account number. Is there away of extracting the account number to a new sheet/column? The account number will always be 8 characters and will contain letters and numbers, the letters in the account number will always be UPPERCASE
Sum Data Depending On A Date
I have a workbook full of a bunch of sheets with the same formatting. Each sheet has data for a 2 week period.
I am making a “master” type sheet and I’m hoping to be able to pull some data from each sheet.
On each sheet:
Row 1 has dates starting on E1 and ending on AF1 (several blank/combined columns)
Row 22 has the data I want to pull, and it is one column to the right of the date. So, F22 corresponds with E1…
One sheet looks like this:
E1 = 8/24/09
AF1 = 9/6/09
I got single amounts to work by using:
However, I’m hoping to find a formula that would look at the entire two week period and sum the row 22 amounts for each day that falls within a certain month.
Which comes back false since not all days in the two week period fall within August (8).
Does anyone have any ideas for a formula that would be easily changeable, and that would pull & sum row 22 data for each row 1 date that falls within a certain month?
Extracting Data From Access With SQL Query
I have been trying to pass a query to fetch data from Access database.
The query is:
sSQL = "Select Client+, Entry-ID, Type of Contact, Manual Creation, Date Created, Transfer-date, Respond SLA FROM BASE DATA"
The problem I am facing is in:
rst.Open Source:=sSQL, ActiveConnection:=cnn, _
CursorType:=adOpenDynamic, LockType:=adLockOptimistic, Options:=adCmdText
The error I am getting is:
Run-Time error '-2147........'
Method 'Open' of Object '_Recordset' failed...
Extracting Data From A Copy/paste
I am making an excel sheet that will graph many monthly results based on data extracted from a company's custom software. My objective is to minimize manual input, so I am trying to find ways for the excel sheet to read info that is copy pasted and appropriately place it in a graphable format.
I attached an example of a data extract that would basically be copy/pasted to the excel sheet.
My current idea is using VLIST and MATCH to find the column number of the VLIST needed. However, I don't know how to identify the data of the extract by date because the year and month are divided between cells, and some cells are merged, etc.
How would you make it so that the data that is copy pasted into a sheet falls nicely into the table in the excel sheet?
Extracting Part Of Imported Data
to extract a number from an imported cell containing text, a number and date. i need to use this number as part of a formula in another cell and the data needs to be refreshed every hour.
eg. the cell imported is "USD 30.97 (March 27, 2007)" and i need to use 30.97 in another cell.
i've tried using data - text to columns, but i realised that after splitting the cells, the 2nd and 3rd columns can't be refreshed.
Extracting Part Of Cell Data
I need to extract part of the data from a number of cells. I was thinking a vlookup would be the right way to go about this but i don't know how i can make it look for only part of the data in a cell.
example data Required Extraction Data
PXC-WIS-HAR075/001 = I need the data HAR075/001
GXR-Cru-WOO046/001 = I need the data WOO046/001
LST-Wis-KAV001/001 = I need the data KAV001/001
GXR-CAP-EDL001/001 = I need the data EDL001/001
RXW-ACT-WAL081/001 = I need the data WAL081/001
SXS/mf/SMI085/001 = I need the data SMI085/001
SYM-CEN-HAP001/001 = I need the data HAP001/001
SYM-Act-MAY025/001 = I need the data MAY025/001
I should have also wrote that I do have a list of the file numbers for the vlookup to.
Extracting Data From This Text Format
I have a text file with a long list of data that simply needs to be extracted under separate columns in excel. Below is one sample out of a long list. Here is sample data and the format of the text ...
ABC MORTGAGE LLC
232 23RD ST STE A
BAKERSFIELD, CA 93301
Approval Date: Dec 08, 2007 [11 Areas Approved for Business]
HECM: No Originates 203K: No
Telephone: (343) 633-1234 FAX Number: (343) 632-1330
E-Mail Address: email@example.com
In excel I need to have these columns, Company Name, Address, Phone, Fax, and Email. I need to pull the data out of the text file automatically and insert it into these columns. The other information in the sample such as approval date is not needed. How do I do this?
Extracting Data Into Cells From String
I am accessing a ratings system for horse racing and trying to extract the top-rated runners for each race using a database query. The problem is that every runner and rating is in one cell and separated by spaces. I have tried using text to columns but obviously can't use space as a delimiter as the horse names have spaces in them sometimes. The one cell basically contains the following string...
COCONUT MOON 100 CARIBBEAN CORAL 100 HOWARDS TIPPLE 97
A2 = COCONUT MOON
B2 = 100
A3 = CARIBBEAN CORAL
B3 = 100
A4 = HOWARDS TIPPLE
B4 = 97
So that I have each horse and it's rating alongside it in the adjoining cell, I figure I somehow need to use LEN, RIGHT, LEFT or something but can't think how to do this
Extracting Data From Inventory Report
I have made several stabs at extracting data from an inventory report, but keep hitting roadblocks and would appreciate some help in my 1st VBA project.
I have attached a spreadsheet with sample data - the data is in a fixed format, and I have overwritten unnecessary data, but all the data to be extracted is in Columns D, O, and P.
My approach was to go down column D testing for non-blank fields that do not begin with "Total", thus creating an array of item names. Then I would add the code that would go across adding Quantity and Value into the array.
Extracting Data To Form A New Table
As per the example, I have a spread sheet comprising 4 pairs of columns headed Option and Grade (numbered 1 to 4). Col A is the Name of a person, cols B to I contain option (subject name) and grade data. Not every option and grade pair is used and the distribution is random.
In each used pair the grade is always one cell to the right of the subject. For each person name, I want to extract all of the grade data and place it into a separate table having separate columns for each subject i.e. who got which grade for the range of subjects.
By using the lookup function, I am able to identify where the subject and grade pairs are for each row. I have been unable then to move one cell to the right to extract the grade letter. I have thought of combining OFFSET with LOOKUP but can’t make it work.
Extracting Selected Data Into New Worksheets
I have a workbook, see attached example, which has multiple columns. I want to extract the data for a certain criteria, in this example column E "product".
I then want to take all of the data in columns A to L for the chosen criteria e.g. product 1696 and place it in a new worksheet. I want to do this for every unique product. The example I have given only shows 2 products and limited rows, in reality I could have 50-60 products with hundreds of rows per product.
Extracting Data Based On Dates
I have a table with 'Product Rereference', 'Date', and 'Estimated Assets' Columns. I need to run a formula that will extract the number in my 'Estimated Assets' column, based on speicific list of 'Product Reference' numbers that I have filetered, and a specific date - 1/31/ of each year.
I've been trying to create a formula, however I can't seem to work it out.
I have attached a file, which should make things a lot clearer :P I am trying to make the data extract into the table to the right. I have filled in the first few columns manually, to show what I would like to formula to achieve.
Error Extracting Pivottable Data With VBA
I try to extract datas from a pivottable (so one data source) which could change.
The items of one field are changing (given by the user through Inputbox): "batch"
The items of the second field ("type plate") are at each time visible (the macro make them visible to have the complete information concerning the "batch")
So I want to extract values and labels from one particular pivottable (the one I display), selecting several batches. But the problem is that some of the items have no value, so disapear fron the table) even if they are visible. As I extract the value on each item (see code below) I get an error message saying "runtime error 1004 application-defined" when the macro read "valeur".
Dim pt1 As PivotTable
Dim pf As PivotField
Dim pi As PivotItem
Dim pj As PivotItem
Dim i As Double
Dim valeur As String
I tried to go through this problem using "on error goto solution" but it works only one time, and after same error message
How coud I avoid to calculate "valeur" with the Items (pi) not displayed ?
Protecting Data When Extracting From Another Sheet
I need is for the Roster sheet, which has the exact same column and row headings as the Leave sheet, to read the data from the Leave sheet and change dynamically if the Leave sheet is changed. If there is data in any cell then I need to protect just that cell in the Roster sheet so that the user creating the staff roster is unable to edit it out.
I have created a plain cut and paste macro on open from Leave to Roster but this doesn't give me the dynamic linking, and doesnt help solve the problem of needing to check each and every cell in Roster against a corresponding cell in Leave, but also if its blank in Leave to allow the user to update that cell in the Roster sheet.
Array Extracting Data From Tables
I've encountered is the spreadsheet attached. Basically I am trying to create a "complex" array (at least it's complex for me lol) to basically extract some values from tables and put them in one together. The array I thought would work is on the table with BRIGHT YELLOW BACKGROUND, whereas the table that could do the same work but more "manually" is with a RED border around it. I know I can do it manually as the red border table shows, but I've been trying all day to make it work with a complex array.
Extracting Parts Of Data In A Cell
i have a cell which contains data like this
in cell A1
12. John Smith (67)
There are hidden spaces in cell a1 as well which are not needed, which i can get rid of using TRIM so that may need taken into consideration ??
In Cell A2 i would just like John Smith
In Cell A3 i would just like the 67
the number and . at beginning is not needed just the name and number (no brackets)
Extracting Data From A Text String
I have a few hundred rows of text in the fomat below: 1.23456 xxxxxxxxxxxxxxxxxxxx. The “x’s” represent text which is unique to each row. what the formula I need to extract the number (1.23456) at the start of the string? To complicate things the number may be reported to any number of decimal places, so the formula needs to be able to extract the first block of digits at the start of each row and report it as a number that can be used in calculations.
Extracting Matching Data From Another Worksheet
I have a "cat_no" file and a "master inventory" file.
I need to do a vlookup to match the catalog #'s and mfr name in the cat_no file and the master inventory file. I also need to pull the pricing and packing string from the master inventory file and add it to the cat_no file where item numbers match.
Extracting Data From Closed Workbooks ..
i am currently doing a survey. the survey's are done in excel format and after i send out to everyone they will return me the soft copies in excel format. After which i would have many "forms" in excel format. i would like to extract all the data out from those forms into one worksheet. How is it possible ? It can either be excel formulas ? in-built functions or macro.
Extracting Data From Closed Workbooks
I've got 20 spreadsheets called Week 1 to Week 20 each has two sheets called Wk 42 T and Week 42 R. They are stored in a shared area. I want to Copy all the data in Column M in both sheets and then transfer the data to a summary sheet with a sheet for each.
I've got the below code to open the workbooks but need help with selecting that data per workbook then by sheet and looping through each sheet and pasting in Column A.
Dim lCount As Long
Dim wbResults As Workbook
Dim wbCodeBook As Workbook
Application. ScreenUpdating = False
Application.DisplayAlerts = False
Application.EnableEvents = False