+ Reply to Thread
Results 1 to 4 of 4

VBA Code to optimize and clean data - Round II Merge columns

  1. #1
    Registered User
    Join Date
    03-12-2012
    Location
    Vila Real, Portugal
    MS-Off Ver
    Excel 2016
    Posts
    17

    Question VBA Code to optimize and clean data - Round II Merge columns

    Hey everyone,

    I need to merge some columns in my excel database, so:

    Please Login or Register  to view this content.
    I'm using this basic formula to put all my data together.

    The problem is not all rows have information, so when it doesn't have text it doesn't need to do anything, is there any solution?
    Last edited by JoaoVr; 04-04-2012 at 05:58 AM. Reason: Thanks!

  2. #2
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: VBA Code to optimize and clean data - Round II Merge columns

    You want VBA code or formula?
    Anyway below formula
    =if(and(M2<>"";N2<>"";Y2<>"";AD2<>"");CONCATENATE("Activity: ";M2;"| Field: ";N2;"|Feedback: ";Y2;" | Other Obs.: ";AD2);"")
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Registered User
    Join Date
    03-12-2012
    Location
    Vila Real, Portugal
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: VBA Code to optimize and clean data - Round II Merge columns

    Quote Originally Posted by tom1977 View Post
    You want VBA code or formula?
    Anyway below formula
    =if(and(M2<>"";N2<>"";Y2<>"";AD2<>"");CONCATENATE("Activity: ";M2;"| Field: ";N2;"|Feedback: ";Y2;" | Other Obs.: ";AD2);"")
    I tried that as also, but there is a problem, M2 can be empty but not N2 (Just the activity field is empty and there is something on the Feedback field)

    VBS would be better, my Office is in portuguese and I need to translate formulas, and VBA no =)

  4. #4
    Registered User
    Join Date
    03-12-2012
    Location
    Vila Real, Portugal
    MS-Off Ver
    Excel 2016
    Posts
    17

    Re: VBA Code to optimize and clean data - Round II Merge columns

    Please Login or Register  to view this content.
    Found it =)

    SE = IF
    E = AND
    CONCATENAR = CONCATENATE

+ 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