[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Delimeter in excel to handle a specific scenario

Posted on 2012-12-24
8
Medium Priority
?
231 Views
Last Modified: 2013-01-03
Hi All,

I have an excel as this

name,age,www.google.com/somename/something,name,www.EXcert.com/whateveryurl/somename,extension

The last column has some URL's which has a coma , in the URL and when i delimit the link gets broken

www.EXcert.com/whateveryurl/somename,extension

into
www.EXcert.com/whateveryurl/somename and  this in next column extension

anyway i can handle this scenario?
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 10

Expert Comment

by:mark_harris231
ID: 38718783
Presumably, you're opening a CSV file in Excel?  Is this a one-time project or on-going?  Do you have any control over the format of the source file?  If yes, then you could encapsulate the URL within double-quotes:

"www.excert.com/whateveryurl/somename,extension"

The double-quotes would cause Excel to ignore the comma in the URL.

If you don't have control over the source file, you would need to either A) modify the source file, either manually in a text editor or via batch, or B) modify the spreadsheet post-import.

If the data is being imported beginning in Column A, you may bea able to use this formula in Column F, then copy down as far as needed:

=D1&E1

This does mean you'll end up with a couple of redundant columns (D&E).  You could copy/past special>values in Column F, then delete Column D & E if necessary.  This process would likely not be suitable if this is an on-going process.
0
 
LVL 11

Author Comment

by:bsharath
ID: 38718985
1. Its a report that i cannot change

2. I cannot use the formula because when i delimit the content gets overwritten

Its a regular i mean daily requirement
0
 
LVL 9

Expert Comment

by:jsdray
ID: 38719149
but you could use a macro to do as mark suggested...  If you're interested in going that route I can post the VB code...
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:mark_harris231
ID: 38719188
Can you clarify your process?

1. What is the native format of the report file?
2. What steps do you take to open the file in Excel?
3. What part/parts of your current process are automate?  (I presume the report file is automically generated daily?)
4. What do you do with the Excel file once in the proper format?
5. How many lines is the typical report file?
0
 
LVL 9

Accepted Solution

by:
jsdray earned 2000 total points
ID: 38719194
Sub JustDoIt()
' merge col C & D
Dim intRow As Integer
Dim strColC As String
Dim strColD As String

intRow = 1 'change to starting row (if header row make this 2)
  
  Do
    strColC = Cells(intRow, 3).Value
    strColD = Cells(intRow, 4).Value
    if strColD <> "" then 
         Cells(intRow, 3).Value = strColC & "," & strColD
         Cells(intRow, 4).Value = ""
    endif   
    intRow = intRow + 1
  Loop While Cells(intRow, 1).Value <> "" ' loops until there is no more entries

End Sub

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 38719618
1. What is the native format of the report file?
The format is csv

2. What steps do you take to open the file in Excel?
Its a csv so just double click

3. What part/parts of your current process are automate?  (I presume the report file is automically generated daily?)

Its a website report and is scheduled to email daily via gmail

4. What do you do with the Excel file once in the proper format?

I need to delimit ad then filter various columns to find issue in data

5. How many lines is the typical report file?

Report as of today has 10 columns and 40K rows and 1K rows are daily increased
0
 
LVL 11

Author Comment

by:bsharath
ID: 38719621
jsdray

I get as csv and all the content is in Column A when i open

While i manually delimit the content gets over lapped on the other columns
Not sure why this happens so the data in the last columns turn out wrong
0
 
LVL 10

Expert Comment

by:mark_harris231
ID: 38724076
bsharath - can you post a non-sensitive sample of the source file (e.g., 10-20 rows)?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question