+ Reply to Thread
Results 1 to 3 of 3

rates table vba conversion

  1. #1
    Registered User
    Join Date
    12-22-2009
    Location
    Denmark
    MS-Off Ver
    Excel 2003
    Posts
    2

    Talking rates table vba conversion

    I have an Excel rates table that I need to convert.
    The original structure is, 1st column dial prefix, comma separated list.
    2nd column is country name and 3rd column is call rate.
    Like this:
    Please Login or Register  to view this content.
    and so on.
    However, for importing the list into a voip call accounting database I need to have for each dial prefix one separate entry.
    So, what I did was saving the xls sheet as tab delimited text, then replacing in Word ,<space> to ^p (new para) and then import the whole result into Excel again.
    This however leaves me the country name and rates cells unpopulated for the new dial prefix lines.
    I saw in this forum a VBA solution to then autofil the unpoulated cells. In my case it would however need to autofill from the bottom on upwards because the unpopulated rows need to be filled with the next populated entry.

    So - in short, the best would be a VBA to convert the above into populated line-by-line entries.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: rates table vba conversion

    Put your comma-delimited values as demonstrated above into column A starting at A1.

    Then run this macro on that data:
    Please Login or Register  to view this content.
    The macro goes into a regular module (Insert > Module)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: rates table vba conversion

    devplan,

    Welcome to the ExcelForum.

    Please post your workbook, with sample data, before and after worksheets - scroll down and see "Manage Attachments".
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1