Maro, Insert Rows Where Rows Determined By Number Of Carriage Returns
Feb 17, 2010
The best way to explain my problem is to look at the table below:
How it looks now: ApplePrice 1
Price 2
Price 3FruitDeliciousPearStore 1
Store 2FruitVery DeliciousHow I want it to look:ApplePrice 1FruitDeliciousApplePrice 2FruitDeliciousApplePrice 3FruitDeliciousPearStore 1FruitVery DeliciousPearStore 2FruitVery Delicious
View 9 Replies
ADVERTISEMENT
Jul 6, 2014
I have a situation where I have source data formatted like this:
Document ID
Document Name
Author
[Code]....
What I would like to do is to get each author on a separate row. I am able to do that using Text to Columns using the carriage return and then doing a transpose. I've also seen some threads where VBA is used to accomplish similar. However where I am stuck at is getting everything else to drop down accordingly. I.e. with the data set above I'd like to get to:
Document ID
Document Name
Author
[Code]....
View 3 Replies
View Related
Jun 30, 2013
I'm working with a document that has several cells which require double carriage returns within cells. The location of each space is marked with an @ sign. A few weeks ago, I found an article online that explained how to do a find replace where the find value was '@' and the replace value was a series of numbers/characters that created a carriage return. When I doubled the carriage return code I got my two spaces. If I remember correctly, the string that I entered still appeared in the cell, so I needed to clean up afterwards by replacing that string with ' ', but it still left the line break.
View 9 Replies
View Related
Aug 26, 2009
i want to hide rows in accordance with the line numbers that have been determined with Macro, on G3 (Start Rows) and H3 (End Rows).
And i have attached my example file on excel (.xls)
View 2 Replies
View Related
Jun 24, 2009
When I save my file as text and upload into a program, I get a response saying that my file can't be processed due to carriage returns. What are these things and how do I get rid of them? My excel file has about 6000 rows and 50 columns of data.
View 14 Replies
View Related
Jul 30, 2013
Is there a way to insert a specified number of rows. For example, I want to insert 500 blank rows today but maybe tomorrow it will be 650 blank rows.
View 1 Replies
View Related
Feb 7, 2008
I found lots of threads for inserting rows but not the one I need. I'm trying to insert rows with a macro on the position as specified in a cell f.e. in cell D4 I type the number 80 then the macro has to insert three rows at row 80
View 2 Replies
View Related
May 7, 2008
I am concatenating data which will be displayed in a text box.
Is there any way to force a carriage return within the formula ?
View 9 Replies
View Related
Dec 29, 2008
My first sheet shows the data - a list of audits and their current status.
AuditStageAlphaIn ProgressBetaReportingCharlieCompleteDeltaCompleteOmegaPlanning
I've then used a simple count formula to add up the number by each stage and it's these numbers that I want the macro to use when determining how many rows to input.
Complete2Reporting1In Progress1Planning1
A second worksheet hosts the desired output - a simple report template, split into stages for each status type (completed, planning etc.) with the correct number of rows for each.
Completed AuditsCharlieDeltaReportingBetaAudits in ProgressAlphaAudits in PlanningOmega
So, I want the macro to ensure that we have the right number of rows for each stage, as this month will be run on a monthly basis and the stage each audit is at will change, and the number of rows required in each section will also be different.
View 9 Replies
View Related
Jan 31, 2008
I have a spreadsheet which contains data needing to be re-formatted into a suitable format for my database. So far I have been doing this by hand, but want to make it quicker as I have over 2000 lines to sort out. I am trying to write a macro that determines whether there is data in the column next to the active one (D2), and if there is counts how many columns there is data in. Once it has done this it needs to insert the same number of rows as there are columns, then copy the column data and transpose it into the empty rows. My macro seems to work at first, but it exits after around the 4th row, but I can't work out why.
Sub split_For_Database()
Dim No_Of_Cells As Integer
Dim Start_Cell As Range
Dim Cell As Range
Dim LastRow As Range
Dim i As Integer
Dim lRows As Long
Set LastRow = Range("C65536").End(xlUp)
i = 0
Set Start_Cell = Range("C2")
Set Cell = Start_Cell
Do While Start_Cell.Address <= LastRow.Address
Do While Cell.Offset(0, 1) > 0
i = i + 1
Set Cell = Cell.Offset(0, 1)
Loop...................................
View 8 Replies
View Related
Sep 9, 2009
I have a cell that contains several carriage returns. How do I extract data from between 2 carriage returns?
View 5 Replies
View Related
Nov 30, 2006
I have 4 cells with text in them that I am trying to combine into one cell and not have any blank lines between the text. The cells are arranged like this:
A1="One"B1=Cell where the text is combined
A2="Two"
A3="Three"
A4="Four"
I set the cell alignment in B1 to wrap text and use the following formula in B1:
=IF(A1=,,A1)&IF(A2=,,CHAR(10)&A2)&IF(A3=,,CHAR(10)&A3)&IF(A4=,,CHAR(10)&A4)
The problem is if there isnt anything in one of the cells in column A it makes a blank line between the text in column B. I am trying to get the text to the top of B1 and not have any blank lines between the lines of text. Is there a way to change the formula so that it will do the following three things:
1. If the cell A1 doesnt have anything in it then dont put the value in B1.
2. If A1 has something in it and A2 has something in it then put the text of A1 in B1 and HAVE a carriage return after the A1 text.
3. If A1 has something in it and A2 does not have anything in it then put the text of A1 in B1 but DO NOT have a carriage return after it.
View 7 Replies
View Related
May 17, 2007
I have an SQL query that returns some text data to a cell from another system.
In this system the users sometimes enter superfluous carriage returns after the text.
Can someone tell me how to write a formula/VBA code that would remove the trailing carriage return/s.
View 9 Replies
View Related
Jun 20, 2007
I have done a search on carriage returns/characters and what has been suggested is not working. I have BOTH carriage returns in the cell and also the boxes (that I assume are also carriage returns. I tried the substitute formula (=substitute(cellref,char(10),)) in excel but it only removes the alt+enter carriage return. I tried the various suggestions of find & replace but the chr$..etc did not work! Is there a formula to clear both in one (not a macro!)..?
View 2 Replies
View Related
Apr 23, 2014
I have an excel sheet that I've automated for my shop ... Basically it copies a set of rows from one sheet, asks for which cell you want to start the paste at, then pastes it... Here's what I have so far:
[Code] .....
So I tried to use a variation of strReturn to indicate number of rows wanted but that didn't work ... Basically I'm going to create the "data" to include 50 rows, but have it selectable for the user to say they only want 5, 7 or 29 rows ...
View 2 Replies
View Related
Feb 11, 2014
Original
01012014 DAVE JOHN
02012014 MAT
03012014 CHRIS MIKE PHIL
What I want
01012014 DAVE
01012014 JOHN
02012014 MAT
03012014 CHRIS
03012014 MIKE
03012014 PHIL
View 4 Replies
View Related
Feb 20, 2009
Column B contains geographical Areas. Column C contains a list of business departments.
North Env
North Env
North Ops
North Sales
North Sales
North Sales
South Env
South Maint
South Ops
South Sales
South Sales
South Sales
Etc.
The values and number of these departments will vary. I want to insert lines to sum the totals at the bottom of each geographic area based on the number of different departments. So, for this example, for the North three lines would be inserted. For the South, 4 lines would be inserted.
View 4 Replies
View Related
Jun 7, 2007
I need a macro that runs through the cells on a sheet and removes all carriage returns. The carriage returns appear as small squares amongst the text (they come from a CSV file).
View 9 Replies
View Related
Oct 12, 2007
I have a worksheet containing square carriage return symbols (see below).
EXAMPLES
Eg1. Baked[]Beans on []Toast
Eg2. Smoked[][]Salmon in Brine
Eg3. Ice[][][] Cream [][]Cosmopolitan
Eg4. Mixed[]Nuts[][]per kilo[][][][]
Eg5. [][]Baby Shampoo[]Fragrance Free
This data was extracted from an SQL Database and dumped into Excel.
I would like to know if someone can suggest a script to replace all occurrences of [] with a space.
Once I perform this, I can then perform a Search/Replace function as follows:
Replace 4 spaces with 1 Space
Replace 3 spaces with 1 Space
Replace 2 spaces with 1 Space
Hopefully then, the final result will appear as follows:
Eg1. Baked Beans on Toast
Eg2. Smoked Salmon in Brine
Eg3. Ice Cream Cosmopolitan
Eg4. Mixed Nuts per kilo
Eg5. Baby Shampoo Fragrance Free
Eg5. is a little tricky because a space will appear at the beginning of the cell (see above). It would be good if there's a script to remove occurrences of this also.
View 9 Replies
View Related
Apr 14, 2008
Is it possible to replace double returns with single?
View 9 Replies
View Related
Jul 2, 2006
I need some direction on how to proceed with dismantling an address cell. I have a workbook that one field is an address label field. What I mean is the entire address is entered in one field just as it would appear on an envelope. I need some suggestions on how to break this apart and create individual fields for the individual parts.
View 6 Replies
View Related
Apr 8, 2014
I am trying to insert formulas to my cells in different columns and then fill down the formulas as many rows as in the reference column. So far I have put my formulas in a macro but I seem to get problems with " and ' symbols. My macro looks like this:
Sheets("Sold Articles Database").Select
Range("U3").Formula = " =VLOOKUP(LEFT(K3,2),'Input Variables'!$A$48:$B$52,2,FALSE)"
Range("V3").Formula = " =VLOOKUP(K3,'Product datas'!$A$2:$C$10000,3,FALSE)"
Range("W3").Formula = " =VLOOKUP(K3,'Product datas'!$A$2:$D$10000,4,FALSE)"
[Code] ........
View 3 Replies
View Related
Apr 18, 2013
I am trying to link the data from one cell to another. My destination cell has the formula
[=IF('Request Form'!A39="","",'Request Form'!A39)].
Which works great for values in the reference cell that do not contain carriage returns, which is possible. The problem I am running into is that if the reference cell contains a carriage return the destination cell just ignores it and crams the lines together for display purposes. Is there a way/formula I can use to force excel to display 'exactly' as entered, in cell returns and all?
View 4 Replies
View Related
Dec 9, 2011
Is there a way to delete excessive carriage returns at the beginning of data. I pull reports from a SharePoint list where submitter entries often often contain multiple carriage returns before the text or data. I use ASAP utlitily to clean out excessive spaces before and after data, but I don't find a way to remove these multiple carriage returns so that the text entries are easily viewable when row-height is less than gigantic. Cells with extra carriage returns before the text entries end up looking like the following:
___________________________________________________________________
| |
| |
| |
| |
| Product page for CQ1-14047.LA is missing Swindex section (Core Drivers). |
|__________________________________________________________________|
View 4 Replies
View Related
Feb 9, 2013
I would like to have my macro code search column A (supplier numbers) and split the rows into groups of rows of 5 or less and then insert 3 blank rows between each group of rows. The split needs to start on a new supplier number and cannot split a supplier number into two different groups. Here is a sample:
Supplier
Invoice Date
GL Date
Invoice Amt
[Code].....
View 1 Replies
View Related
Oct 30, 2013
I have a spread sheet with values in the area of A1:H834
In column H, I have number values from 1-7.
Essentially that number value means that the values in the row are duplicate.
So, for example, if H2 has a value of 4, that means that $A$2:$G$2, really should have an additional 3 rows underneath with the EXACT same data in each cell, however, the way the sheet was created, was to remove the duplicate values and just indicate in column H, the number value of how many duplicates $A$2:$G$2 really is.
I need to unpackage this and create what it was originally. What type of formula can I use, to look at the value in H2, and then insert underneath that number of rowes with the exact same data as A2:G2 and do the same for the remainder of the table all the way down to A834:G834
View 1 Replies
View Related
Mar 15, 2014
I'm a macro novice and have been trying to teach myself how to write the correct one for a task I need to do, but I cannot seem to get it right. Basically, I have bunch of data and for one of the variables, different values are separated by commas. What I want is to create a row copying the info below for each piece of data after the comma.
Sheet1
A
B
C
D
[Code].....
I suspect there is a fairly easy way to do this, but I cannot figure it out from searching the forums (or rather, I can't get it to work right).
View 6 Replies
View Related
Jun 26, 2014
i have this code which inserts blank rows in alternate rows,
Code:
Sub insertrow()
' insertrow Macro
Application.ScreenUpdating = True
Dim count As Integer
Dim X As Integer
For count = 1 To 20
If activecell.Value "" Then
activecell.Offset(1, 0).Select
[code].....
what changes should i make in this code to insert rows only when ther are now blank rows. So first time i run, blank rows are already there, and when i update some data at the bottom and re-run it inserts blank rows again.
View 3 Replies
View Related
Jun 21, 2008
as per the attached, need to insert those grey rows subject to the following condition :
if current row date <> next row date, .and. current row latitude / longitude <> next row latitude / longitude , insert grey row with date = current row date, else insert grey row next row date
note that the coordinates in the repeated grey rows, for the "Home" location, are the same through the sheet, should be entered by the user, at the beginning of the process, since there will be a spreasheet per user.
date is in column K
latitude / longitude are in columns B / C
this will be of tremendous assistance in automating mileage claim review.
View 8 Replies
View Related
Jan 26, 2010
Is there any way to insert a carriage return after each instance of a character? I have a section of data that requires a carriage return after each instance of -v eg:
View 8 Replies
View Related