i have a large table, columns A:F, would like a code which would look at the text in column F and create a new row for each bit of text separated by comma
probably easier to show what i mean, here is a section of the table, in this example store 13121 needs multiple rows.
start with this:
My current project involves sorting a spreadsheet, selecting specific qualifying data from the sheet, storing it into a variable, the pasting the individual values from the list into individual cells on a different sheet within the same workbook. Here is the code I have so far...
Code: Sub Test() '' freeze screen updating to remain on main worksheet Application.ScreenUpdating = False '' move to Avaliable worksheet [Code] ..
When this code runs the first item in the list pastes into Sheet10 A1, but no other values from the list are placed into Sheet10. Previous to this I had been using a variation of this code to push the list into a combobox list within a userform. In that case instead of
Code: ThisWorkbook.Worksheets("Sheet10").Range("A1") = x
I had
Code: Combobox1.list = x
And this worked perfectly; creating a list within the combobox (in fact I can use this modification to interrogate my code to determine if the list is being properly generated, and it is).
I have a workbook populated with values in 3 columns. The values of the second column group rows into larger segments. I want to pull one row for each different value onto a different sheet.
example: 1. apple 2. apple 3. apple 4. apple
How do I only pull one row of apples onto another sheet without copying by hand? I have attached an live example. I want to pull one row for each classification (column 2) named on the sheet without copy/pasting each one.
I need to insert blank rows at the end of the each data segment to add totals for each individual. Is there a macro that I can use for this? I'm attaching an example file.
See the attached xls. There are two worksheets contained therein, one with the original data, and the other showing how I'd like it organized.
I have rows of product data consisting of a product id followed by repeating attributes of quantity and associated price. I need to convert each product row to multiple rows of each quantity/price pair while preserving the id for each pair.
I have a long textBox with multiLine = true and enterKeyBehavior = true. I need for each new line in the textBox to go to a separate row in the worksheet. Right now the data is copied to the next row in the worksheet, but all of the data in the textBox is entered into one cell. Is there a way for the lines to go into separate cells?
Example of what i am trying to accomplish:
TextBox: |------------------| |blabla in line 1 | |blabla in line 2 | |blabla in line 3 | |etc................ | |etc................ | |_____________|
then the VBA code would separate the lines into separate rows:
Worksheet:
Row 1: blabla in line 1 _______________________ Row 2: blabla in line 2 _______________________ Row 3: blabla in line 3 _______________________ Row 4: etc.. _______________________ Row 5: etc..
Let's say I have a document with 10 different sections in it. I download it from another piece of software so there is a header/etc on each page. Each page has the name of a company on it in the A column and the name of a section on it in the cell directly below the company name. (Lets call the sections candy, toys, medicine, etc.) I want to separate the information by creating a new sheet for every section and name it toys_sheet, candy_sheet, medicine_sheet automatically. How could I do this?
I have a large amount of data that is from an events file. When I enter it into excel, it almost maxes out the row count (excel 2010) The data basically lists Event, Date/Timestamp, Call ID, and a few other details. Im trying to get a total of specific events and if they were successful or not, so the other columns arent of concern. For instance, there is an event called searchbyphone, a later row in the data will include searchresult found or notfound. The only way to pair these up is by the ID number which is unique per call.
So in the example below, ID 123-45-789a was a search by phone and successful (found). The Date/Time field is down to milisecond. If this were just adding up all the various events and then totalling the searchresult found/notfound, it would be simpler. However, Im only interested in certain events and found/notfound is used for many other events.
Using the data below, what is the best way to pull out an event (say the total number of searchby phone) and then know how many of those were found and not found (when the information needed is on 2 seperate rows and only the ID would be the same?)
To through a wrench into it, there can be several events with the same ID becasue the ID is unique to a call - a caller can search by a few variables. There will be the same amount of found/notfounds though with that ID. (meaning as a caller, I can do a few searches and all of these will be in the event file with the same ID) In this case, the number of requests (events) will match the number of results (found/not found).
What Im trying to accomplish is to get a total of searchbyphone found and not found, So in this example I would have searchbyphone found = 1 and searchbyphone notfound = 0.
ID Event Date/Timestamp
123-45-789a searchbyphone 10/7/2013 12:52:38
987-65-432b searchbycity 10/7/2013 12:52:39
123-45-789a searchresult.found 10/7/2013 12:52:41
874-35-123c searchbyzip 10/7/2013 12:52:42
987-65-432b searchresult.not found 10/7/2013 12:52:47
I know how to separate data into different columns i.e. Marry Johnson into two separate columns; however, I have data in different rows that I need separated into different column. See screen cast [URL]
A B C D E F G H I J K L M N O 1 ** ** *** ** ** ** ** *** ** *** ** ** *** ** ** 2 ** ** *** ** ** ** ** *** ** *** ** ** *** ** ** 3 ** ** *** ** ** ** ** *** ** *** ** ** *** ** ** 4 ** ** *** ** ** ** ** *** ** *** ** ** *** ** ** 5 ** ** *** ** ** ** ** *** ** *** ** ** *** ** **
I need a macro that can automatically export the cell data for each row from Column A--> O into it's own seperate text file, and name each text file with the text in column A. So again... everything in row 1 from A to O would be copied and pasted into a text file called (A1 cell data).txt
once that first text file has created, I was hoping that there could be a loop to automatically close the first text file and move on to row 2 and do the same, copy all text in row 2 from A to O into a new text file titled (A2 cell data).txt, close and move on to row 3 etc etc.
this is a large list of approximately 8,000 records.
I am trying to count the # of rows in a spreadsheet in which there is non-blank text data in 2 separate columns. For instance, if the spreadsheet looked like the one below (dashes just for formatting purposes):
NAMES-------THIS-------------THAT Mary-------some text--------some more text John-------<blanks>---------just text here Sue--------just some here-----<blanks> Dave-------something--------something else Adam------<blanks>-----------<blanks>
The total # of rows with something in both the "THIS" and "THAT" columns above would therefore be 2.
I need to separate row data from one workbook into separate workbooks based on cell data. Currently I filter the data, copy and paste it to a new workbook and save it. It's a tedious process and was hoping to find a way to automate it. I have attached a sample file. In this instance, I would like a separate workbook for the filtered data in Column 1 and then all the row data gets copied to new workbook. So all of Pennsylvania data would get copied to new workbook, then all of the Michigan data gets copied to a new workbook. I have also attached an example of the end result that I need.
I have created a spreadsheet to do all payroll calculations. Would like to print out each individual persons detail to give them a "receipt" of gross pay and deductions.
How I could take a sheet with 100 names and print out each line.
I am needing to sort individual rows horizonally (by columns) - sound simply enough, but apparently its not (unless I'm overlooking something really basic). For example, I need to sort each row (2 - 300) beginning in column B and ending in column P individually. I can do this - one at a time - using Excel's sort function, but its time consuming and this is something I need to be able to do on a regular basis.
I have a Text ID Column and a Text Column. I need to save each row of the Text Column into its own individual text file on my C: Drive. The name of the file should be the the Text ID from the first column. I need this to work with different sample data, so the number of rows will vary. I also need this to be able to work with excel files that contain thousands of rows.
I have an Excel file containing data about employees. Each row contains a lot of information that is relevant for a specific date range, denoted by the columns "start date" and "end date". I would like to copy each row so that I have it accessible per date that is within the date range. The only columns that would change in the copy are the date columns. For example, for 1 row that has a date range of 01/08/2013 - 05/08/2013, I want to copy the row 5 times except the date columns become "01/08/2013", "02/08/2013", etc.
I am working with an excel spreadsheet. There is a column for "name", and then the next column is for medical condition.
If the same patient has multiple (say, 4) conditions, the rows for "name" are combined into a single cell(let's say, a cell going from row 2 to row 5, witha a single name in the combined cell) , with the next column having four different cells adjacent to the single cell (cell 2 has "bleeding", cell 3 has "fever", cell 4 has "diarrhea", and cell 5 has "rash"). Some patients have only single conditions, single cells.
Will this mess up COUNTS and COUNTIF?
Is there a way to split the combined cell2-5 for ''name" into four cells all containing the same name?
I have been using this macro to separate lots of rows with a certain amount of blank rows.
Example:
Code: Sub test() Dim j As Long, r As Range j = InputBox("type the number of rows to be insered") Set r = Range("A2")
[Code] .......
I trying to change it so that, instead of inserting how ever many blank rows, it just copys the row above.
Example (Row A to C)
I have been messing around with macro recorder and i could select each row and paste it into the blank rows, but from researching on the internet selecting and pasting data seems to be a waste of resources (ram?) and i will be running this on a couple hundred rows (lots of data). Also, i would like to keep the functionality so that i can still choose how many times it copys/inserts each individual row from a input box.
I eventually want the data to end up like it is shown in the table but i am takin it one step at time because i want to understand what the code is doing.
I have a spreadsheet containing thousands of addresses, and I need to separate the zip code from the address. Each address is in its own cell, and the only divider is spaces (sometimes two spaces). I attached an example of what some entries look like. Is it possible single out the zip code? addresslist example.xlsx
I need a VBA code to take everything after a certain word and put it in a new cell below it. The cell would have View More in it most of the time, and sometimes spaces will be messed up, so it will have a name after it but it should actually be in the cell under it. So if the name is A Maple, it will say View MoreA Maple. So the A Maple need to go in a cell below it.
This vba code will delete all the rows which have data in. At present it starts on A2 (so doesnt delete anything above A2. Which part of the code in red would I need to change for it to be A3 and which would I need to change for it to be B3.
I have built a tool that automates the creation of some excel models. When each one of these models is created and deployed I need it to have all VBA code removed from it.
What vba command can I run that will strip all vba code out of a chosen workbook?
below is a VB code to email separate sheets based on sheet anme and email address on a sheet called " mail".
Code seems to fail at the last line " Next a" any ideas why this is not working
Sub Mail_sheets() Dim MyArr As Variant Dim last As Long Dim shname As Long Dim a As Integer Dim Arr() As String Dim N As Integer Dim strdate As String For a = 1 To 253 Step 3 If ThisWorkbook.Sheets("mail").Cells(1, a).Value = "" Then Exit Sub
The following code displays the message box and loads a userform if the Active cell offset 1, -1 when within G column equals "LAST ROW".
[Code] .....
How can I change it so instead it performs those same actions (displaying the message box, and loads the userform) if the number of rows between the last data entry in G and the last data entry in F is equal to 0?
I have data on Sheet2 and would like to only copy all rows associated with column D2 to the Sheet3. For example Sheet2 has two different values Voice or Data I would like to copy all rows associated with column D that contains voice to Sheet3.