Insert Double-comma At End Of String

May 25, 2008

i'm a complete excel novice, but i think this should be pretty easy for you guys...

i just bought a new satnav system after 4 years with tomtom...

anyway, to get the speed camera database to work with it, i must add a couple of commas at the end of each set of co-ordinates contained within the spreadsheet, like this:

-3.23956,51.52737,1,50,1,67,,
-5.29024,50.22664,1,50,1,67,,
-5.27461,50.23143,1,50,1,247,,

thing is, most of them don't have the 2 commas at the end and just end with the number, like this:

-3.23956,51.52737,1,50,1,67
-5.29024,50.22664,1,50,1,67,,
-5.27461,50.23143,1,50,1,247

therefore, what i need to do is make up a formula in excel to search for a double comma at the end of each set of co-ordinates and if it doesn't already have them, then it should insert them...

i'm guessing for anyone with excel experience, this should be pretty easy to solve...

View 9 Replies


ADVERTISEMENT

Sumproduct Formula And When To Use Comma's, Double Negatives, Addition

Jan 21, 2010

look at my attachment and see what I am doing wrong in my formula? I have a hard time understanding the Sumproduct formula and when to use comma's, double negatives, addition, etc.

View 2 Replies View Related

Remove The Last Comma In The String

Jan 16, 2007

The below function concats a range of cells by csv. How can I get it to remove the last comma in the string when it's finished?

Function SpecialConcatenate(rnge As Range) As String
Dim r As Long, col As Integer

For c = 1 To rnge.Columns.Count
For r = 1 To rnge.Rows.Count
If rnge.Cells(r, c) "" Then
SpecialConcatenate = SpecialConcatenate & _
rnge.Cells(r, c).Value & ","
End If
Next r
Next c
End Function

View 9 Replies View Related

Insert Comma Between Letters And Numbers

Jan 30, 2014

I'm looking to insert a comma between letters and numbers like seen below using Windows 7 and Excel 2013. I'd prefer to do this through a formula and not a VBA script. I know this is easy to do if you know how many characters strings are going to be and the format stays consistent.

ABCD90bj10r7
ABCD,90,bj,10,r,7

ABCD90rt8r7
ABCD,90,rt,8,r,7

iFH15jr7ri12
iFH,15,jr,7,ri,12

iFG155jr8ri11
iFG,155,jr,8,ri,11

iFG15jr8ri9
iFG,15,jr,8,ri,9

View 2 Replies View Related

Split String Separated Comma

Oct 9, 2013

In filed I have couple of value separated by comma like below:

A1 header1
B1 header2
C1 header3

Audi
592035, 579733, 653749, 579735
20 000

If my macro found that string (always will be separate by ",") should split the string and add rows (= to number of string). The output should be as below:

A1 header1
B1 header2
C1 header3

Audi
592035
20 000

[Code] .....

I have:

Code:
Set sourceWb = ActiveWorkbook
Set ws = sourceWb.Worksheets(1)

Dim LastRow As Long
Dim MY_Split As Variant

LastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

[Code] ...........

View 1 Replies View Related

Search Comma Delimited String

Dec 1, 2009

I have a spreadsheet with a number of columns containing comma delimited strings (years) which I need to check cell by cell and return false if anything apart from the years 2001 to 2008 is found.

For instance, a cell may contain the years (2001, 2005, 2006, 2007, 2008) or (2006, 2007) or (2001, 2004, 2008) or (2004) or any combination of those 8 years.

I thought of using the Split function on each cell and then looping through the resultant array to do a comparison against each of the 8 years but with a large number of delimited strings to check it could be a bit time consuming. Any idea how I could accomplish this more quickly and efficiently either with a formula or VBA?

View 9 Replies View Related

Insert Comma Before First Capital Letter In Cell

May 10, 2014

I have many lines of text and I wondered if there is a formula so I can insert a comma before the first capital letter of each line? A small amount of text is below

leave on left Salter Road
right Brunel Road

What i would like is there to be a comma before the first capital letter so it reads

leave on left, Salter Road
right, Brunel Road

Is this even possible?

View 14 Replies View Related

Comma Separated String Element Count

Aug 20, 2014

I need to count how many comma separated elements are in each cell. This is what I have so far,

[Code] .....

The error is Method 'Range" of object'.

View 9 Replies View Related

1,000's Of Rows To One Comma-delimted Text String

Mar 25, 2008

I have a worksheet with 17000 rows of words that end in commas in column A, i.e.
Column A
Row 1 = Word 1,
Row 2 = Words 2,
Row 3 - Word 3,
etc...

I need to get this into the following single string format...

Word 1,Word 2,Word 3,etc...

I want to ultimately save it as a .txt file.

View 9 Replies View Related

Insert Call When They Have Double Number

Dec 19, 2008

I want to insert call when they have double number, See attached sample.

View 6 Replies View Related

Insert Time Stamp On Double Click

Jun 12, 2014

I'm trying to have excel insert a timestamp on a specific range of cells. I have it currently working on one cell, but can for some reason am having trouble getting it to work on the entire range... Here is what I have currently...

PHP Code: 

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Address = "$E$23" Then
Target.Value = Time
End If
End Sub 

I would like this to work for the range E23:E28 and F23:F28 I'm sure its something simple that I'm not doing...

View 3 Replies View Related

Look Up Data From Multiple Columns And Insert In One Cell Using Comma To Separate?

Jan 31, 2014

I have a data set that I wish to look up the data from one column and if it is greater then 0 write it in another column separated by commas. Here is an example:

The data is dates that a service was provided and how many time that day it was done and not everyone gets the service on the same days. I would like to summarize the days of the month that service was provided not number of times into 1 cell.

A B C
Row 1 November
Row 2 1 5 15
Row 3 1 0 2
Row 4 0 1 3

November is in A3

If A2 is greater then 0 I want to write A1 A2 If A2 and A3 is greater then 0 I want to write A1 A2, A3 If A2 is 0 and B2 is greater then 0, I want to write A1 B2

View 14 Replies View Related

Split Comma Separated Text And Insert Into Next Row Retaining All Other Columns

Oct 26, 2013

Original table:
Column1
Column2
Column3
Column4

AAA
DDD
A1
X123, Y123, Z123

[Code] .......

View 1 Replies View Related

Insert Alt Enter Into A Cell Or A Column With Defined Comma Counted

Sep 20, 2008

I am looking for a code to insert alt-enter into a cell or a column with a defined comma count per line, saying 5

is

C1,C2,C3,C4,C5,C6,C7
C8,C9,C10,C11

want to change the cell(s) as

C1,C2,C3,C4,C5,
C6,C7,C8,C9,C10,
C11

View 9 Replies View Related

Split Words In Comma Separated String To Cells In Column

Nov 1, 2012

I have extracted a string from my address database which goes like name,address1,address2,city,postcode,country

I need to display in Column B as:

name
address1
address2
city
postcode
country

how to do this using VBA.

View 2 Replies View Related

Macro Combines Cells Into String But Puts Undesired Comma At The Beginning?

Jul 21, 2014

I have a macro that takes the column of data from D on Sheet 1, pastes it into A on Sheet 3, gets rid of duplicates and then, in B1, combines all the numbers from A into a comma-separated string. The only problem is that it puts a comma at the beginning of the string. Is there something I can do to make that first comma not be there?

View 5 Replies View Related

VBA - Remove Double Quotation Marks Around String Variable?

Jul 29, 2012

I would like to query your knowledge database (too much VBA I guess ) as I have a predicament that I cannot seem to solve.

Here is the thing: I am trying to write a sub that would enable me to automatically put in place extensible name ranges (the Offset worksheet function).

The problem is that, despite everything seems to go well, the reference in the name box displays : ="DECALER($C$2;0;0;5-1;1)" (the string comes from a variable and Decaler is Offset in French). These quotation marks are the culprits for sure, as taken off the formula works beautifully.

I've tried everything I've found on the internet, that is to say: Replace(String, Chr$(34), "") so on and so forth, but these marks are not recognized a part of the string so they escape the replacement.

View 9 Replies View Related

VBA To Search String And Insert Row If String Not Found

Apr 11, 2013

I have a spreadsheet which has "Employee: [agent 1 name]" in column A and it may or may not have the word "Break" in the same column before it mentions "Employee: [agent 2 name]". The amount of data between agent 1 and agent 2 varies and am needing code which will insert a row above "Employee: [agent 2 name]" if "Break" is not found, and add the word "Break" in column A on the inserted row. I would need this to loop through the spreadsheet until all 100+ agents have been searched.

I'm also needing this done for the word "Meeting" and would insert a row 2 rows above the next agent.

View 6 Replies View Related

Insert String And String Variable Into Cell

Feb 18, 2014

I'm using a userform to create a new sheet. The form already creates the sheet and names it what was typed into the userform. Now I want it to place that variable in a cell along with a string. the following code will place the variable from the form (tbname) into cell b5.

View 2 Replies View Related

Insert A Zero On The Left Of A String?

Jan 22, 2014

this formula as a result =IF(LEFT(A3,1)="0",RIGHT(A3,LEN(A3)-1),A3) It worked great to strip the left most zero from a string of text numbers in the cells where the formula was applied.

However, now I need to put the zero back in lol!

So...how would I adjust the formula (or write a different one) to insert a zero as the first digit of a string of text digits?

View 4 Replies View Related

String If Text Insert Date

Feb 11, 2010

I am trying to setup a variable from a dropdown selection box. Basically, If "Completed" is selected in the box, current date is set in the corresponding field.

The formula I have tried is:
=IF(F5="Completed",G5="",G5=NOW())

I have a variable string setup opposite of what I am going for that works:
=IF(AND(D5<>"Assigned",D5<>""),IF(E5="",NOW(),E5),"")

So if anything is showing other than assigned the date is input. But have not been able to reverse this for the desired output.

View 2 Replies View Related

Automatically Insert Space In A String

Dec 18, 2008

I have a column called "Unit Size," which contains data such as 200 g, 0.32 g, 15 mL, 2 mg.

I need a macro to automatically insert a space between the numbers and the letters, for example, if someone types 10g it automatically converts it to 10 g.

The strings may be of different lengths, i.e. contain different numbers of decimal places or signficant figures.

View 4 Replies View Related

String Sql Insert Statement Syntax

Jul 16, 2009

In excel macro, I am trying to input data into sql server from excel ADO
what is the correct syntax for an insert statement using string sql? This table has two columns supplier ID autonumber and desc as varchar.

View 2 Replies View Related

Insert Row Macro Based On Text String

Nov 20, 2009

I'd like to adapt my macro so that it would insert a blank row after it detects the the first 16 characters of text as "'Closing Balance"; or it could even detect "'Closing" as the first 8 characters if it would be simpler

The Data Begins in Row 5 of Column A

My Current Macro is as below which I have adapted from another one I used

It is not working since it is detecting for the exact text "'Closing Balance" whereas the data registry would write "'Closing Balance as at 31/10/2009" , of which the "as at dd/mm/yyyy" portion would change every time a report is exported, but the first part "'Closing Balance" or even just the word "'Closing" will always be the same.

View 6 Replies View Related

Insert Text String From Inputbox In Cell?

Jan 13, 2012

I'm trying to write a bit of to take a text string collected from an inputbox, and paste it into a specific cell.

Should be easy but where my text string from the inputbox is "XYZ", when it enters it into the required cell it enters it as " ="XYZ" ".

Attempt at code is below -

Code:
Sub EmailEdit()
Dim Response As String
Response = Application.InputBox("Input administrator email address", , , , , , , 2)

'Check to see if Cancel was pressed.
If Response = "" Then

[Code] .....

View 2 Replies View Related

Insert New Row With String Based On Conditional Statement

Sep 6, 2008

I've been working on this project to propagate certain products through multiple categories. I chose to use excel to assign multiple categories to each product. On sheet1 I have setup products (column a) and qualifiers in the following columns (color, model, etc). What I would like to achieve is for the user to select yes or no for each category column and and if yes then have the corresponding category breadcrumb string (from sheet2) inserted into one specific column in sheet3. As the user continues to select multiple "yes" from the category columns for that single product, those additional category breadcrumbs get inserted at the end of the list in sheet3.

View 9 Replies View Related

Insert Pic Into Comment For Every Cell That Has Text Containing String .jpg Or .png

May 10, 2009

I need a nudge in the right direction with how to amend the below code so that it :
1: cycles though all cells in a workbook, and sees whether the text reference of the cell contains a picture filename (i.e. searches for .png or .jpg in the cell contents)
3: if (1) is correct, it retrieves the picture from "C:/Users/jeff/Documents/Standards/" and pastes it as a cell comment background in the cell to the right (and overwrites any comment backgrounds that might already exist there)

The code below does something a bit different: it looks in a defined range, then adds a comment with a background picture retrieved based on the text in the cell to the left.

I'm sure this is a pretty basic change, but my VBA skills aren't up to it...I've only just started reading though Walkenbach's Power Programming! I'm using Excel 2007

Sub InsertComment()
'www.contextures.comxlcomments03.html
Dim rngList As Range
Dim c As Range
Dim cmt As Comment
Dim strPic As String

On Error Resume Next

Set rngList = Range("A1:A5")
strPic = "C:/Users/jeff/Documents/Standards/"
On Error Resume Next
For Each c In rngList
With c.Offset(0, 1)...................

View 9 Replies View Related

Lookup Comma Separated Data And Return Comma Separated Answer

Mar 19, 2014

Comma separated data on sheet 2, look up info on sheet 1, return comma separated data on sheet 2.

Sample file attached : Book1.xlsx

View 3 Replies View Related

Insert Multiple Characters Into String With LEFT RIGHT Functions?

Apr 29, 2014

I've got a long list of account numbers of varying length and ultimately need to add a dash and a dot into these numbers. Here's an example

12345678 to> 1-2345.678
123456789 to> 12-3456.789
1234567890 to> 123-4567.890

The standard format is always 3 numbers after the . and 4 numbers between the - and .

I can get to this by doing a series of functions starting with this:

=LEFT(A1,LEN(A1)-3)&"."&RIGHT(A1,3) to get 12345.678 or 123456.789

copy/pasting that value into another field and then doing this

=LEFT(E1,LEN(E1)-8)&"-"&RIGHT(E1,8) to get the results above

I can't quite figure out the format to combine the multiple steps/functions into one so that I'm not copy/pasting values and re-doing the function.

View 7 Replies View Related

Insert Column Macro Based Variable String Letter

Jun 11, 2008

I'm working on some code that's part of a userform. To illustrate what I need, I will give an example. A column letter, 'J' for example, is stored in colNum.Value taken from the userform. I need both a column inserted before column J, and data entered into that new column in row 2 (thus J2, which would now be blank).

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved