+ Reply to Thread
Results 1 to 6 of 6

Macro required for arranging data

Hybrid View

  1. #1
    Registered User
    Join Date
    08-29-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    83

    Macro required for arranging data

    Hello,

    I would like a macro that grabs the relevant data from columns A, E, G, and O and puts the data into column U in the format below (see bottom 2 lines).

    For example output in column U should be:

    Hi Moss, I wanted to apply for a Graduate Software Engineer in London, Kind regards, John
    Hi Louise, I wanted to apply for a Senior Web Developer in Gloucester, Kind regards, Bill

    The data should be processed from row 2 to unlimited rows. Please see attached excel.

    Thank you in advance,
    Ash
    Attached Files Attached Files
    Last edited by nobleprince; 07-11-2018 at 05:18 PM.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro required for arranging data

    Maybe :
    Sub Test()
      Dim a, i As Long
      With Sheets("Sheet1")
        a = .Range("A2:O" & .Cells(.Rows.Count, "A").End(xlUp).Row)
        ReDim b(1 To UBound(a, 1), 1 To 1)
        For i = 1 To UBound(a, 1)
            If Len(a(i, 1)) Then b(i, 1) = "Hi " & Split(a(i, 15), " ")(0) & ", I wanted to apply for a " & a(i, 5) & " in " & Split(a(i, 7), " ")(0) & ", Kind regards, " & Split(Split(a(i, 1), "@")(0), ".")(0)
        Next i
        .Range("U2").Resize(UBound(b, 1)).Value = b
      End With
    End Sub
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

  3. #3
    Registered User
    Join Date
    08-29-2010
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    83

    Re: Macro required for arranging data

    Works perfect. Thank you very much karedog!

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Macro required for arranging data

    @ karedog,

    I Hate You!

    Quick, short and sweet Coding.

    Well done my friend!

    Kind regards.
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  5. #5
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro required for arranging data

    Winon my old pal, late as usual

    Thanks so much for the reppies

  6. #6
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Macro required for arranging data

    You are welcome nobleprince, thanks for marking the thread as solved and rep.points.

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. I need help with arranging data with macro
    By venkatpvc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-04-2014, 08:02 AM
  2. Data arranging as per FIFO using macro
    By djwaz69 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2013, 01:57 PM
  3. Macro for re-arranging data from a csv-file
    By chrissim16 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2010, 09:44 AM
  4. Excel - Arranging, Matching & Presenting data using a macro.
    By AliJay in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2010, 01:49 AM
  5. macro for arranging data
    By excelguru in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2007, 06:32 AM
  6. need a macro for arranging the data
    By yagna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2006, 09:00 AM
  7. Help wth arranging/graphing data macro
    By frankcase in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2005, 09:35 PM

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