+ Reply to Thread
Results 1 to 12 of 12

Is there an easy way to modify an excel database?

  1. #1
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Is there an easy way to modify an excel database?

    I'm using Excel 2010 and I have a list of names and addresses and it's pretty much just like they did it in Word. I need all the names in one column, addresses in another. Is there an easy way to do it because I have 1400 names and that would take many hours.
    Last edited by RachelIp; 10-24-2011 at 10:43 AM.

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Is there an easy way to modify an excel database?

    Possibly but it would really help to see a few examples in a sample workbook to see if there is any logic to the layout of the data.

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    I don't really have a place to upload the sample but I can show it here

    NAME
    Address
    City
    (3 empty cells)
    NAME
    Address
    City
    (3 empty cells)

    This goes on for 1400 names and I'm moving each cell individually. And I need them to appear like this

    Name | Address | City

  4. #4
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Is there an easy way to modify an excel database?

    You can upload files to the forum.

    Have a go with this anyway:

    Please Login or Register  to view this content.

    It will take the addresses from column A and write them to columns E:G.

    Dom

  5. #5
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    You'll have to forgive me, but I don't even know how to use code in Excel.

    I have been doing them one at a time and I just noticed the format changed.

    Now it's
    NAME
    (1 cell space)
    Address
    City
    (2 cell spaces)
    NAME
    (1 cell space)
    Address
    City
    (2 cell spaces)

  6. #6
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    I tried the code and I have all the business names in a column, but what about the rest of the information? How do I alter the code to do the rest of the data?

  7. #7
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    NEVER MIND!

    I played with the code and accidentally figured out how to get the address and city to list into columns (even though the names didn't come with it)

    Please Login or Register  to view this content.
    I just changed

    lngWriteRow = 1
    For lngLoopRow = 1 To Range("A" & Rows.Count).End(xlUp).Row Step 6

    to

    lngWriteRow = 3
    For lngLoopRow = 3 To Range("A" & Rows.Count).End(xlUp).Row Step 6

    I want to thank you so much for your help Domski! You were a real life saver!!

  8. #8
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Is there an easy way to modify an excel database?

    Sorry, I left work. It should bring the names. If you need help modifying the code let me know.

    Dom

  9. #9
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    It didn't bring the names so all I did was use your code and run the macro a second time to pick it all up.

  10. #10
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    This is a sample of the database I was given
    Attached Files Attached Files

  11. #11
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Is there an easy way to modify an excel database?

    Here you go:

    Please Login or Register  to view this content.

    Dom

  12. #12
    Registered User
    Join Date
    10-18-2011
    Location
    Saskatchewan, Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: Is there an easy way to modify an excel database?

    That worked! You're a life saver!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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