Excel 2007 :: Consolidate Several Columns Into One (not Concatenate)
May 6, 2014
I have the following situation and I'm trying to do this using a PC with Excel 2007.
I would like this:
T
N
O
O
C
O
E
I
M
I
T
[Code] ........
To look like this:
T
H
A
N
K
[Code] .........
This procedure will become part of a macro. The number of rows will vary but the number of columns will be the same (11 columns). I don't care too much about the order since I can later sort. As long as the data from all columns in now in one column.
The workbook has two worksheets "Data" & "Crunch". "Data" contains the raw data-range B1:U50. "Crunch" is the processing worksheet. Row 1 is a header row. Columns A-D are empty. Column E (rows 2-81) contain the numbers 1-80.
The macro is intended to run in "Crunch". I need to add the CountIf function in every cell/row filling the range F2:BC81. A loop does the trick for me to fill the rows in each column but I don't know how to move the loop down each column without creating a new loop.
A section of the code is below. Notice a majority of the code is the same, the copy in red is variable from loop to loop. I need to repeat this loop through column "BC" (50 times in total). My guess is there is a way to write this code one time instead of 50 times adjusting the variable components.
Code: 'Find total # of records and then store in variable totalrecords = ActiveSheet.UsedRange.Rows.Count 'CountIf Statement
I have a workbook with 4 sheets and with sheet 5 as a "consolidated" sheet. I have to create the macro, which will on a daily basis copy the populated data from those 4 sheets and paste into the sheet 5 (same workbook). The data in the Sheet 5 should be pasted from row 2 below each other.. Row 1 will be the headings and shouldn't be replaced. The data in all 4 sheets should be copied from row starting 37, columns C to BA but it will end with different row numbers. note that columns A & B are populated but shouldn't be copied.
So I am pulling some data fields from a pivot table....most of the cells will be a zero....but for the ones that populate text, I want to concatenate the words together with a comma in between into the AN cell at the far right and ignore the zero cells....
I have a pivot table that summarizes jobs that need to be completed on a specified date. I need to put that information on a calendar, but I would like to concatenate all information from that date so I can do a vlookup from the calendar. My other problem is that the number of cells change for each date, so I cannot specify exact cells, (some only have 1 entry, but others may have 4 or more). Can I specify a range of cells based on the result of the pivot table?
I have attached the pivot table, calendar and the data sheet with the vlookup info. Am I using the proper calendar or method to find this info?I have struggled with this for over a week now.
I would like to take the data from worksheet1 and put into worksheet2 but limit the length of a list (the real spread sheet has over 100 rows and i would like them in 4 sets of 25 versus the example I provided). Is there an array or macro that would make this work (keeping the formatting)..
Need to sort part of an Excel worksheet across multiple columns.
For example data is:
ABCDEF1 Machine 4394264394294394434399834399842 Model TD860TD400TD860TD620TD6203 Pgm OPTABCOPTEP2EP24 Start 5/31/119/1/115/1/096/15/092/1/085 End 2/28/158/31/125/31/114/30/108/31/09
I need to sort it first by Pgm, within Pgm by Model, and within Model by Machine. I do not need to sort on Start or End
The results should look like: ABCDEF1 Machine 4394294399834399844394264394432 Model TD400TD620TD700TD860TD8603 Pgm ABCEP2EP2OPTOPT4 Start 9/1/116/15/092/1/085/31/115/1/095 End 8/31/124/30/108/31/092/28/155/31/11
After selecting the data to be sorted (columns B,C,D,E,F), I tried using "Sort Left to Right" under DATA-SORT-OPTIONS but it doesn't seem to work.
how to add many columns to the rightmost part of the worksheet carrying on from Col AA?
I keep getting error 'Cannot shift objects off sheet.' and followed instructions to change a setting to All or use control-6 but this made no difference.
I'm looking to simply find a function that allows me to lookup a certain value in a table of data and return the value in a specific column. So if I looked up the current date, 6/27/2011, it would return the week it is in (26). I dont want to be limited to just the monday column however, as the dates I will be throughout the entire week. Is there an easy way to do this in excel 2007?
I am using Windows xp and Excel 2007. I'm creating a user form and have a vlookup formula that goes to a table and looks up calories and sodium based on the text entered by the user. My problem is that I want to be able to populate the 3 columns with information and then sum the values that are returned to the Calories and Sodium columns. Is that possible with Vlookup?
I am trying to copy two columns to a different sheet in vba code. I will ultimately need to do this multiple times but I think I have the iteration part ok, it's just the copy part that seems to be wrong.
The original code I used for this works great on one column but I knew the letter column each time I used it. Now I am trying to get two columns at a time and will be iterating through several based on user selections. I figure that will be faster to do both columns as the two columns are side by side.
I am getting an error on the PasteSpectial line "Run-time error '1004' PasteSpecail method of Range class failed.
I'm not sure where to go with this but I am assuming I have a problem with the Range selection lines on either the source or destination or both. The support is just for Macro errors.
macro for an Excel 2007 file. It has to be a macro. I have cells in two columns I need to look at. Column A will have a value of cat, dog, or mouse. Column B will have a date. If A2="mouse" AND B2<"1/1/2013" Then A2="" ElseIf A2=mouse" AND B2>="1/1/2013" Then A2="mouse". I don't need anything to happen if A2 is equal to cat or dog. The macro has to move down the entire A and B column: A3/B3, A4/B4, and so on until the end of the columns. Hope this makes sense. I've tried a few macro samples I found online but they don't quite fit what I need done, or I don't know how to modify it.
I'm using Excel 2007. My pivot table seems to be limiting me to 256 columns in the Values/Data area. In researching below I believe that I should be able to have 16,000 columns in my Pivot Table.
[URL] The "Big Grid" and Increased Limits in Excel 2007
PivotTables Maximum rows displayed in a PivotTable report is 1 million. Maximum columns displayed in a PivotTable report is 16,000. Maximum number of unique items within a single Pivot field is 1 million. Maximum number of fields visible in the Fields list is 16,000.
I am looking for a way of allowing users to edit the existing cells at their will, but simultaneously disabling the option to insert/ delete columns or rows.
By enabling Sheet Protection, I cannot find a way to do it. Can I?
I am on MS Excel 2007 by the way.
I found the way, just unlock all cells in Format Cells, Protection Tab. Then Protect sheet and de-select what you want to disable.
I am currently using MS Excel 2007. Is there a way in VBA to automatically insert missing columns based on a defined series or range of values?
For example, we have a report that displays columns of: Year 2004 to Year 2012 per column (9 columns in total). Sometimes, it displays missing a year or years (thus; our report has less columns). For example, it only shows 2008 to 2012 (missing 2004 to 2007). At times, it misses some years in between. What we do is manually add those missing years by manually inserting columns then inputting the missing year as their column headers.
Is it posisble for VBA to check if the columns contain all of the defined Year range (for example, you've initially defined: Year 2004 to Year 2012)? Afterwards, all missing columns are automoatically inserted (in chronological order or based on your defined values or range).
I'm currently working on a process to recategorise products for a distribution company to give a category based on successful sales transactions.
Product Code Category Month 1 Month 2
[Code].....
This isnt the actual data in case you're wondering I'm doing this with 32k lines.
So, what I want to have is categories based on sales transactions, labelled with letters. So, cat A is sales in three consecutive and top X when total of three month consecutive sales, cat B being above X number of transactions in three months not already categorised by cat A. There is a Cat C, and various others which I can do myself, but i dont know how to make the category A work.
I have a data set that tracks ingredients in chemical products. For example sake the chemical product is a mixed color, and the calculated ingredient is a primary color.
I need to calculate the quantity of two primary colors based on their percentage of the mixture.
Column A contains the mixed color names. Columns B and C contain the percentage of the primary in each mix.
I began tracking this data in January 2009. Each month I add 3 columns to the worksheet. The 1st column contains the monthly mixed color quantity used. The 2nd and 3rd columns contain the calculation of the two primary colors.
I need the formula to calculate the 12 month rolling total for each primary color. (For July 2014 I need to calculate July 2013 through June 2014)
I have to find the union of 2 columns in excel and club those 2 columns into a single column with values in the increasing order.eg: column 1- 0 2 4.. , column 2- 1,3,5.. final result in column 3 should be 0 1 2 3 4 5...plz let me know the code for this that i can run in VB editor(- excel 2007)
How to run some VBA code only when double click any cell of three different columns (say A, G,H) and not run in any other cell. This is being run in Excel 2007.
I am trying to develop a compliance report with Excel 2007) based upon a simple pass/fail criteria. The subtotals must be tracked both by Device (column) and by Requirement (row). There are macros (not included in the attached sample) that hides both columns and rows. I successfully found an example which I modified to correctly calculates data for a column when rows are hidden (see GOOD function below). However, I'm totally clueless on how to calculate data by row when columns are hidden (see BAD function below). What I'm trying to figure out is highlighted in red in the attached spreadsheet.
GOOD =SUMPRODUCT(SUBTOTAL(103,OFFSET(B$2:B$5,ROW(B$2:B$5)-MIN(ROW(B$2:B$5)),,1))*(B$2:B$5="Pass"))
BAD (returns 0 and includes a circular reference) =SUMPRODUCT(SUBTOTAL(103,OFFSET($B2:$F2,,COLUMN($B2:$F2)-MIN(COLUMN($B2:$F2)),1))*($B2:$F2="Pass"))
I have a text file that I need to open in MS Excel 2007. The file contains the following data. (Each column is delimited by the "|" character.)
Part #|Inventory ID 1743|213,221 1864|10,40 1948|1170,1180 5265|100,104,107,10004
Ultimately, I need three columns but the data needs to look the same as it did before I opened the file.
When I open the file for the first time, I use “Text to Columns” to delimit the fields by the "|" character. The problem is that the Inventory IDs in the middle column get a bit whacky.
Here's what I'm left with: Part # Inventory ID 1743 213,221 1864 10,40 1948 11,701,180 5265 10,010,410,710,004
The comma is retained appropriately when there are two 2- or 3-digit Inventory IDs.
When a row has multiple, longer Inventory IDs or Inventory IDs that vary in length, the comma is moved to every 3rd decimal place.
I tried putting quotation marks around the data before I opened the text file for the first time but that didn’t do anything. I tried Custom Formatting to retain the comma position (0000,0000) but this only worked when I had two 4 digit IDs. I also changed the number type to Text and General. Once the comma was changed, I couldn’t figure out how to get it back.
How to best retain the format of my Inventory IDs.
I am trying to reformat the attached doc into one single column, It's a race listing of overseas marathons and I need it to look like this
Event Name Event Date City Country Entry fee Website
in date order, one event after the other in a single column so I can flow it into a word doc ready to be designed. I need to apply in Excel (I am using 2007) to get this doc into the required format?!!
Excel (2007) user however I'm not very well versed with VBAs and Macros.
I have three sheets and on each sheet the first 5 columns (A - E) have the same title (all in row 1, frozen top row and with filters) there are other columns but I only need A -E to auto transfer.
Sheet 1 is named "Total"
Sheet 2 is named "Management Referral"
Sheet 3 is named "Health Assessments"
What I'd like is for any entry that goes into any row in both sheet 2 and 3 to automatically transfer to sheet 1, but only the information from columns A - E.
There will be dates (dd/mm/yyyy) in column A in each sheet and when transferred to sheet 1 they must be listed chronologically oldest to newest.
I also need all the information in columns A - E that transfer to sheet 1 to stay in their respective sheets.
I have some connector lines that cross over tables in Columns G:K that are connecting tables in $D to tables in $M
How can I make the part of the connector line in $G:$K invisible?
something like:
Code: Sub FormatConnector Dim oConnector as Shape With oConnector If .Connector Or .Type = msoLine If .Connector In Columns($G:$K) Then .Connector.Segment.Visible = False End If End If End with End sub