I have checked to see if this has been answered before and can not find an exact reply. My problem is that I have a combined column of address: Suburb, State, Postcode - which needs to be broken into three which not be done accurately using tet to column or fx - left mid or right. The issue is that the Suburb could be made up of one or two Words with a space between. So I can not separate using text to columns as in some cases the suburbs comprised of two words will put the second word in the "state" column. It can also not be done using Left, Right,Mid, as they number of characters differs in each line. example problem with columns to text.jpg
I have a challenge I haven't quite been able to figure out:
I need a 6 digit trace code to be automatically generated for each job based on the date, the product type and the job number.
The first 2 digits on the trace-code are alphanumeric and the sequence for each job is AA, AB, AC etc.
The last 4 digits are a date code (YYWW.... two digits for the year and two digits for the week number).
The criteria is that multiple jobs of the same product type within the same work week must not have identical trace codes. So Job 1 gets "AA" plus the date code... Job 2 gets "AB" plus the date code, etc. If Job 3 is done in the next work week, it cycles back to "AA" and gets the new date-code.
Generating the date-code was simple enough, but coming up with a function or rule to assign the two-digit alpha has been a challenge that I have not been able to beat.
Below is an example of how the Trace-code column should work....note that Trace code on one product type might be identical to the trace code on another product type.
I have a table with 6 columns (A to F) and multiple rows each, with cells containing words. Taking the words in any one cell from each of the columns in order from A to F will form a complete sentence each time. I need a solution to display all unique possible combinations in column G.
The number of rows is different for each column. A successful result in column G has to include cells from all columns (A to F).
I searched this forum and found a few analogous questions/solutions, but nothing close enough for me to apply to my case. I tried using a concatenation formula, but I have to manually edit the formula in each cell to get all unique combinations (and that would mean thousands of times). If I just drag the formula down it will increment all cell rows instead of one cell's row at a time.
Here's an example : all possible unique combinations.jpg
I'm currently faced with a spreadsheet that has data formatted like this: A 1 RandomRowofData1 2 RandomRowofData2 3 RandomRowofData3 4 RandomRowofData4 5 RandomRowofData5 6 RandomRowofData6 7 RandomRowofData7 8 RandomRowofData8 9 RandomRowofData9
Every 9 rows, a new "set" of data repeats itself (wow, this is so hard to put into words)....
I need to figure out a way to get the data in column "A", every 9 rows, to transpose itself into 9 separate columns.
I have this data source file that comes from a back office program, and basically what i want it to do is to turn the number negative in column C when the header of that column in column A is WITHDR and leave it positive when it is CONTR. What i was thinking was that it could go to column A from column C and go up each cell until the cell is not a date and multiply the column C number by -1 depending the column A header equals WITHDR and do that for every cell in column C, but I dont know how to proceed, im new at VBA.
I have a worksheet with 30 sets of 3 columns, each column has 20 to 30 rows in use for the same realitive data. I want to get the sum for each 1x across 30 sets of the columns. I am checking vs if it says Projected or Actual. My Visual Basic macro ability is very limited at best. I have a totals row for each row of data so i can see totals for 1x over 30 days, 1.5x over 30 weeks, and 2x over 30 weeks.
Here is the basic idea of what i am dealing with:
A B C Projected (merged across A, B, and C) 1x 1.5x 2x 8 4 1.5 7 0 0 8 2 0 8 4 5
Again, this represents one day, and I am trying to track at least 30 days across 90 columns. Also there are anywhere from 20 to 30 people being tracked at any one time so this continues to many more rows depending on the job.
What is the VBA code for inserting text in all column B-cells of multiple selected rows?
I am creating a worksheet with a table containing various data related to orders of various materials (this is more or less data gathering from an older, paper-based 'system'). This table spans, columnwise, from A to D and expands downwards as more orders are added. The information in each column is: A=order number, B=type of material and C=material specs. and D=additional comments.
I've set it up so that the only thing I really have to do is to insert the type of material in the cells of column B, and the rest will sort itself out. Instead of having to insert a new row for each new entry and manually typing in the name of the material (these entries are often done in the midst of already existing data), I created several similar, macroed buttons for the different types of materials we use. These macros work by selecting the row of the currently active cell, inserting a new row and then add the name of the material in the column B-cell of this new row. What I am having trouble doing though, is to get the text-entry to work for a selection of multiple cells.
As an example, lets say that I would like to add 5 orders of "Grade A Steel" in the middle of the table - in the row above row 8. With the macro I currently have I can select cell B5, click the macro, and a new row will be inserted with "Grade A Steel" in column B of this new row. This action could be performed 5 times over, but would be easier if I could just mark a range of 5 cells, say B8:B12, click the macro and get the text/data inserted the column B-cells of all 5 of the new rows. So far I've been able to create a macro that inserts multiple new rows, but I've only been successful in filling the column B-cell in the first row leaving the 4 below empty.
Column A | Column B | Column C Los Angeles | Fire Dept | 3 Los Angeles | Health Services | 12 New York | Fire Dept | 8 New York | Health Services | 22 New York | Internal Services | 100 New York | Public Works | 7 Chicago | Health Services | 15 Chicago | Public Works | 56 Chicago | Social Services | 4
And I am trying to make it look like this:
Fire Dept Health Services Internal Services Public Works Social Services
I have a few pages of information and have grouped rows collapsed to show only the summary information. When I try to print only visible summary rows, whether I use print, print selection, copy and paste to another sheet or copy and "paste special" values to another sheet, all the hidden/grouped rows print or the summary rows print separately on different pages. Is it possible to print only the summary rows.
I am using the following code to copy a unique list, but it gives a duplicate in the first 2 rows(col Q). There is no headings in the columns.
Code: Sub CopyUnique() Dim lastrow As Long lastrow = ActiveSheet.Cells(Rows.Count, "P").End(xlUp).row ActiveSheet.Range("P11:P" & lastrow).AdvancedFilter Action:=xlFilterCopy, _ CopyToRange:=ActiveSheet.Range("Q11"), Unique:=True End Sub
I have a workbook (Sort Test.xlsx) where multiple rows belong to the same "group". Is there a way to sort by a value (e.g. name of the test, date of the test, etc.) while maintaining the formatting and keeping the "groups" together? There are 3 sheets in the work book. The first shows the sheet as is, the other two are examples of how I would like to be able to sort the data.
I have a workbook with many sheets of similar but not identical data. I need to extract columns from each sheet based on 5 header criteria and paste them to a single sheet. Each worksheet contains these 5 criteria.
I've been working with the VBA script I've pasted below. It's grabbing the 5 column criteria that I have in sheet 12, and comparing them to sheet 1 in the workbook, then copying them to sheet 12. This much is good, but I need the script to also return the data from the other worksheets as well. I've tried modifying the script based on other loop functions in other scripts I've found, but I'm not having any luck.
I have a protected worksheet which enables only certain sections to be edited, data inputs etc. I also have a set of rows grouped which need to be activated depending on data type for particular projects to be captured. Problem is, when the sheet is protected, when users click on the + and - buttons to either ungroup and group the rows depending on type of project, this feature is disabled.
I get a popup alert that tells me "You cannot use this command on a protected worksheet. To use this command you must first unprotect the sheet ....". Problem is I don't want all users to have access as giving them the password defeats my purpose of protecting the sheet.
Is it possible to use VBA to calculate the number of numerical occurance within a column of data, and then categorise the results (onto another sheet) based on a grouping variable found in another column of data? I've been trying to create a macro to do such a thing, but I'm not even close ....
Adding ' in the beginning of a line converts the rest into comment line. I wonder if there is an easy way to convert a huge area into comment line to try something on code. I couldn't find such an option in the menu.
I have a database of addresses that has each address as several rows which I want to convert into a single row. In the source file there is a blank row between records. I have attached a sample file with two sheets in it. One is the "before" data format and the other sheet is the "after" example of how I would like it to come out. We have thousands of records to convert so I need something that can be automated instead of a massive cut and paste operation.
I have a spreadsheet in the following format (just a flavour of the format)
SD 1 SD2 SD3 1a 1b 1c 2a
Each row refers to a survey response, the first ten columns being standard demographics.
Following this each group of 5 columns for the next 100 columns represents a single response. What I want to do is convert each single row to multiple rows with the same first 10 columns and each single response on its own row like so:
SD1 SD2 SD3 a b c a
I found an excellent similar example on this board here Convert a single row to multiple rows with the same A column value However I would like my macro to convert to rows even if the cells are blank So each existing row will generate 10 individual reponse rows regardless of data found).
I am interested to know how this would work and how i could modify the variables to acommodate 15 standard demographic fields and 20 columns per individual responses.
I found this code for a button, so I can collapse and expand a set number of rows within that sheet. It works exactly the way i want it to, however, now I have a second sheet in my workbook, and I used the same button. Problem here is that when I activate the button, it opens the same rows in EVERY sheet in the workbook. "For each ws in Worksheets" so my question is what is the term for it to only work on a certain worksheet?
Code: Private Sub ToggleButton1_Change()Application.ScreenUpdating = False Dim ws As Worksheet With ToggleButton1 If ToggleButton1.Value = True Then For Each ws In Worksheets
Other questions is about the ability to send an MS Outlook email from inside of excel.
I've been trying to find something that does the following:
Click button, Form pops up, has drop downs to select recipient, has field for subject, has field for message body, sends email.
I have tried to alter some existing code from this site to accommodate my needs with no luck.
I would like a macro to convert the following.
Column A1-C1 contains Headers Column A-C contains Simple data to be copied down as many rows as needed to match the number of delimited pieces in the following columns. Columns D-I contain Data delimited by 3 spaces. The number of delimited pieces of data can be different in each row. The number of Delimited pieces of data will be the same in each column of a particular row. Example: if D4 has 4 pieces of data separated by 3 space, E4 will also have 4 pieces of data separated by 3 space, F4 will also have 4 pieces of data separated by 3 space and so on to I4.
D5 may contain 5 pieces of data separated by 3 spaces through I5 all containing 5 pieces of data.
Column G may contain a single space within the data delimited by 3 spaces.
Columns D-I may only have 1 piece of data with no delimiter.
I would like the Delimited data to be split apart and a new row created for each piece of data. and copy the corresponding data in column A-C to each new row.
If this can be done in the same worksheet or copied to an existing worksheet that would be great.
Here is a link to a sample on Google Drive [URL]
I am using Excel 2010 but would like it to be compatible with 2003 as well.
As I mentioned I found some VBA to do what I need but it only does 4 columns and I cant figure out how to make it do the 9 I need.