How To SUM Data With The Common Header
Aug 3, 2014
I have attached the excel sheet here for reference.
I would like to sum up the values across rows, so long as they have the terms "FQ1", "FQ2", "FQ3" or "FQ4" in the first row.
In other words, for the row "Total Revenue", I would like to sum up the quarterly values, using VBA, since the number of quarters increase with time.
How should I code up a VBA for that?
View 4 Replies
ADVERTISEMENT
Apr 30, 2013
I want to use a Pivot table to filter data to show just the studies that contain patients from the 'South' area?
As per example below I want to be able to see all the patients in all areas but only for studies that have patients from the south. I put together an array formula that works well for small tables but is too much with one one my sheets that contains 200,000 rows.
Before filtering:
Study ID
Study Short Title
Study Patient ID
Area
1346
LLP
90126
Northwest
[code]....
View 8 Replies
View Related
Feb 15, 2010
Got an issue that I can only seem to do with things like the program Hotkey and making physical macros. I'm sure it is easy but I'm lost.
I have data in one book that looks like this (Call it Book1)
Date: Service
ProviderReason for callCRM
SR #DM
SR #WO #Device #Serial #Issue15/02/2010DATE: 03/02/10
TIME: 11:29
BUS: 1234AO
ISSUE DETAILS: Issue with Console
and data in another book that looks like this (Call it Book2)
DeviceSerial NumberNameTerminal PositionTerminal Group Location DescriptionTerminal IDDescription Service Provider 104012343030123456ConsoleDriver Console1234AO90401234Service Provider Name found Here
I need to find the BUS: 1234AO from the cell in Book1 then look that Bus up in Book2 and then from Book2 copy the Device, Serial Number, and Service Provider into the cells into Book1 and repeat this infintely often. The problem I have is the the bus can have 1 Console and 1-5 Readers and I need to find that data also. So for example I need to find BUS 1234AO and get the Console details and past that into one issue and the next issue will have the same bus number 1234AO but I need the details for Reader2 (that detail is in the Name field as shown above.) The issue details will always have the Console text and Reader# text in it.
The problem I have is that the Reason for call cell has ALT-ENTER characters in it and the details are not always in the same spot but the details are almost always in the format ####AO (four numbers and the letters AO)
View 19 Replies
View Related
Apr 12, 2009
I have two spreadsheets that have one set of data in each column in common.... simply put it is a number.
From the one spreadsheet, I want to pull the column that is to the right of the number in column and merge it with the other data.
I am trying to figure out a formula that will accomplish this... I have attached a file to show the two spreadsheets and my end result I would like to have.
View 13 Replies
View Related
Jul 7, 2011
Table 1
Code:
7/4/2011AMWG16=01BLK25K_USA[a3]*042711Date a Rich Black Man By June 232350$0.19 http://www.jyxsaw.com/blackrm/index.php?t202id=2676&t202kw=AMWG16=01_0210-3
7/4/2011AMWG16=01BLK25K_USA[a3]*042711Date a Rich Black Man By June
[Code]....
I've got two tables of information here, if you scroll to the far right of table 1 and look at the left of table two, you'll see a common code like:
AMWG16=01_0211-20
AMWG16=01_0212-16
and these entries will appear multiple times as well
AMWG16=01_0212-16
appears twice and the data is different and will need to be added up
How can I:
1. Add up the data on each table with the common string such as "AMWG16=01_0212-16"
2. Take all the data that has been added up and combine the statistics, for example,
when its all done it should show
AMWG16=01_0212-16
in the first column, and then all the statistics from the two tables in the columns to the right.
I'm guesssing...
Since some entries appear multiple times, you will need to sum up all the unique entries for that value. Say:
AMWG16=01_0211-20
Shows up three times, you'll need to sum up all the values and this needs to be done on both tables
THEN
You can combine the data
I'm familiar w/ vlookup, index, match functions, but I'm not quite sure how to put this all together
View 4 Replies
View Related
Dec 30, 2008
I have a matrix with info of persons of different cities in consecutive rows, where the
city data is in column B. I would like to eliminate columnb B and divide all persons from
any particular city with 2 new rows, their city name and below a field for every column data.
*The number of employees for city would be variable.
Original data (The columns used go from A to E)
1 City_1 Employee_1 Address_Employee_1 Other data_Employee_1
2 City_1 Employee_2 Address_Employee_2 Other data_Employee_2
3 City_1 Employee_3 Address_Employee_3 Other data_Employee_3
4 City_1 Employee_4 Address_Employee_4 Other data_Employee_4
5 City_2 Employee_1 Address_Employee_1 Other data_Employee_1
6 City_2 Employee_2 Address_Employee_2 Other data_Employee_2 ...
View 9 Replies
View Related
Jan 8, 2008
I am trying to write a VBA code to conditionally copy and paste a range of cells on sheet A into sheet B if the specified cell value is not found on sheet B. Here's an example
On sheet A, there are phone numbers in column M that I need to find in sheet B. The reference column in sheet B is already a named range ("Description") which I'm using to conditionally format several cells in sheet A to turn green when the phone number is not found on B. This is the formula I'm currently using to do this "=AND( COUNTIF(DESCRIPTION, $M2)=0, $R2>0)" ...Obviously I'm using the AND function to tell the format to only work if the cell value of R is greater than 0.
What I would like to do to something very similar to what I already have in place, only now I would like to have a macro search through column M and instead of highlighting the proper cells...I would like to copy the associated row data from columns B:N in sheet A and paste special>values into A:M on sheet 2. Also, I need to keep the "R is greater than 0" condition in place.
View 3 Replies
View Related
May 7, 2013
I have searched and there are some examples that are similar to what I'm looking for but I cannot seem to use those answers to make my problem work. The example from the forums that seems to match my problem the closest is [URL]....
Summary: I have an Excel file called "COST TEMPLATE.XLSX" that has product information (serial number, quantities, pricing), calculations and reports; then on a monthly basis I receive a file (VENDOR_EXPORT.CSV) with updated product quantities to be merged into the cost spreadsheet.
I would like to merge specific data fields from the VENDOR_EXPORT.CSV file into my cost template based on the serial number. I am attaching three dummy files that hopefully describes the issue:
1. COST TEMPLATE.XLSX
2. VENDOR_EXPORT.XLSX - which highlights the cells to be import and to which corresponding column
3. VENDOR_EXPORT.CSV - raw CSV file
My preference is to do this with functions, not macros. How to add the export into the existing workbook as a temporary worksheet, or just pull from the other workbook as CSV file.
View 3 Replies
View Related
May 9, 2014
Looking for some code to do a simple compare column A to Column B (row 1 contains headings) and highlight any differences.
View 3 Replies
View Related
Aug 18, 2009
I have a list of parts in Column A, often times with duplicates in the column.
I have a list of parts in Column B (from another source), again, with duplicates.
What I need is - leaving columns A and B alone;
Column C to be unique Column A parts
Column D to be unique Column B parts
Column E to be parts in common between Columns C and D.
View 9 Replies
View Related
Jul 12, 2006
I have a workbook with several sheets containing prices of products. One column has the product number and a second column has the price. We just received new prices. Can a macro read the product number from the new sheet, find the same product number on the old workbook and transfer the new price. and than change the price so I know it was updated.
View 2 Replies
View Related
Oct 24, 2006
I have a range of data that has been collected by date starting in H4 across several columns. This means that my entries start at different points in each row i.e. -
Row 4 first entry Column AJ
Row 5 first entry Column K
Row 6 first entry Column AB
Using vba is it possible to find the first entry in Row 4 and copy it and all the figures following it in that row to K4 on Sheet2, and then row 5 to K5 on Sheet2 and so on?
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
Feb 18, 2007
I have 2 spreadsheets of names (~2500 and ~1800) and a bunch of corresponding data continuing down the row. both are structured this same way:
Example:
Row1: LAST, FIRST, data1, data2, data3, etc...
is there a formula which can "check" the larger sheet for duplicate names (a row with exactly the same FIRST and LAST), and then either:
1) delete these rows from the smaller sheet
2) clear the contents of those rows
3) or at least flag them in some way so I can quickly delete them
it would be quite a task to eyeball and remove these rows one-by-one, so i'm wondering if a formula could somehow do it (I don't really know anything about visual basic)
One other piece of information which might be important:
For these rows containing duplicate first & last names between the 2 sheets, the entire row is not a duplicate entry; only the names will match (columns A & B)... The other columns down the row will have different values between sheet1 & sheet2. Not sure if this changes anything....
View 4 Replies
View Related
Dec 1, 2013
The attached file shows what I'm trying to do - I'd like to fill in the data in the top left corner table (blue-shaded) with the data combined from the two other tables. Think of the Greek letters as names that are grouped into the groups named {A,B,C,D,E} (the names have no significance, it's just an example).
I was able to do so using an array formula and an extra column (yellow shaded) as you can see in B2 - however, this solution doesn't suite my case because the actual tables will be coming from automated processes and cannot be easily manually altered.
I tried inserting the array formula into the sumproduct formula - see B3 - but for some reason this doesn't behave the same as when the array is outside the formula. I should also mention that I came across a user defined function solution - this too is not so suitable for me right now.
View 9 Replies
View Related
Jun 23, 2008
Is there a way to link a header or a portion of a header to a specific cell?
View 14 Replies
View Related
Jan 23, 2006
I am trying to compare multiple column in a worksheet to find
common component in all the columns and what is unique to a particular
column only. And list the results/finding in adj column. What i am
trying to accomplish is something as below.
BEFORE
Sheet1 Sheet2 Sheet3
Column2 Column2 Column2
02-1234-12 07-1234-12 02-1234-12
04-1234-12 03-1234-12 02-1234-12
05-1234-12 02-1234-12 06-1234-34
AFTER
Common to all Unique to sheet1 Unique to Sheet2
02-1234-12 05-1234-12 07-1234-12
View 14 Replies
View Related
Jul 4, 2014
I added an attachment with an example. You will see a matrix, with in the most left column an ID, then the headers of the matrix has different numbers that mean something.
What I want to do is, you fill in a number in the combobox, then press on a button and a report will be made on a new worksheet. With a list of the numbers and dates in the matrix that the ID has. Like shown in the example sheet in the workbook.
View 1 Replies
View Related
Jul 19, 2007
what is the code to sort a spreadsheet in VBA code by HEADER rows?
i have 2 rows i want to sort by: first by Column D row 1, then by column C row 1.
Cells.Select
Range("C1").Activate
Selection.Sort Key1:=Range("D2"), Order1:=xlAscending, Key2:=Range("C2") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Range("C2").Select
selects all cells, sorts, then de-selects.
View 3 Replies
View Related
Oct 6, 2013
I have two columns of data and what I would like to do is have excel look over one column ( I5-I379) and for each cell that has say 30 in it I want it to return the value from a corresponding column (G5-G379), to form a separate column.......is this possible?
View 9 Replies
View Related
Nov 18, 2011
I've been trying find an appropriate formula to extract the column header from a table in a different sheet if the row header and value in that table is known.
in the lookup table the row titles (column A) are product codes, column titles (row 2, D through AX) are business names and the table values are quantity.
In a different table I have product codes in column A and in column B i have the max number/quantity of products for that code. In column C i want to put the company name associated with the product and the number/quantity.
View 4 Replies
View Related
Dec 12, 2008
I have a spreadsheet template whose Left and Center Print Headers are set to static values.
I would like to pass a single cell's data to the Right Print Header whenever I print the given spreadsheet.
I would also like the Right Print Header to refresh itself each time I print the sheet so that any possible change in the referenced cell will be accounted for.
View 6 Replies
View Related
Apr 17, 2009
I need a bit of VBA code which will run automatically when a csv file is opened. The code needs to move anything after column F onto the next row and repeat until there is no more data. The data is generated by an external program but is put on the same row (not sure why it does this). I have included an example of the csv file (the data in it is garbage so ignore it) for you to look at. the header row which needs inserting needs to be:
A1=Status
B1=Job No.
C1=Date
D1=Name
E1=Room
F1=Description
Hope this is enough information for you. bear in mind the amount of data being generated could be quite large. it has to be run automatically in order to be used in seamless mail merge.
View 2 Replies
View Related
Nov 15, 2012
On sheet1 I got a lot of columns with data, starting from row 8, which is the header.
On sheet2 I'd like to retrieve the filtered data, based on the value mentioned in cell A1 (on sheet2)
So if for example cell A1 on sheet2 shows "Peter", the code should filter the data on sheet1 with "peter" in the header.
The filtering should be based on cell color (red in this case)
The filtered data should then be copied to sheet2 starting from A3
View 3 Replies
View Related
May 19, 2009
I have managed to open an HTML file from IE and start importing some data from the HTML source to an excel table.
The problem is that I need to get access to some information in a function that is in the HTML header and I do not know the syntax to use.
I am defining the HTML document using ".Document.body.innerHTML". But I need to find the syntax that is equivalent to ".Document.head.innerHTML".
With HTMLdoc
.Visible = True
.Navigate PageString
Do Until .ReadyState = 4: DoEvents: Loop
End With
View 9 Replies
View Related
Apr 30, 2008
I have two header rows on a sheet that I need to sort starting on Row 3, Column A.
The sheet is A-K and rows 1 and 2 are headers
Row 1 has merged cells of A-F which says "Information" and then G-K " Tracking Section"
Row 2 is broken up into individual sub-headers in columns, A-K each one having a bit more info for instance:
Under the "Information" merged header in row 1 there is
A2 Name
B2 Work Center
C2 C/O date
D2 Due CC
E2 Due MX
F2 Date Received
and G-K in row 2 has different sub-headings.
I have tried to use my normal code, which is great for one header, but it ends up sorting the sub-header as I call it...
View 5 Replies
View Related
Oct 7, 2009
In the worksheet "Batting and Pitching Register", I'd like to be able to sort the data in the two charts (APBA Batting Register and APBA Pitching Register) by simply clicking on the cells in the respective header rows.
I've set up ranges (Batting and Pitching), but have had no luck moving beyond that.
View 9 Replies
View Related
Jan 31, 2014
I am trying to match headers of different files and copy data.If the one of the header is not matched then a new column with the non matching header should be created and the column has to be copied
Ex: file1.xlsx has AA BB CC as header
file2.xlsx has AA BB DD EE as header
file3.xlsx should contain AA BB CC DD EE i.e data from file1.xlsx and file2.xlsx
I have more than 300 files how can I copy all the files to one excel file by matching headers ?
View 1 Replies
View Related
May 13, 2014
I have a list of S/N with Pass/Fail result next to it. A specific S/N can appear several times in the list:
SN...Result
-------------
111...FAIL
111...FAIL
111...FAIL
111...PASS
222...PASS
333...FAIL
333...FAIL
When creating a pivot table of SN vs. Result (count) I get:
****|FAIL...PASS
-------------------
111..|...3.....1
222..|..........1
333..|...2
I want to get the FAIL count of SN in which PASS > 0 (First two rows)
BUT I can not figure out how I can filter based on the values of the pivot table itself (rather than the values of the original list). When I try to use 'Result' field as report filter, I can not get it as a Column label (and vice-versa). In this case I get:
I get:
****|PASS
------------
111 | ...1
222 | ...1
Desired:
.......|..FAIL..PASS
-------------------
111 |...3...1
222 |........1
Desired (alternative):
......|..FAIL
-------------
111 |...3
222 |...0
View 1 Replies
View Related
Dec 3, 2012
I'm using Excel 2007. I know how to protect specific cells within a worksheet, but I have not been able to find any information online pertaining to locking or protecting inserted header/footer data, even if I protect the worksheet.
I'm not concerned about setting specific VBA commands to ensure the header/footer prints, but rather preventing other users from being able to edit the data upon distribution of the worksheet.
View 3 Replies
View Related