+ Reply to Thread
Results 1 to 6 of 6

Extract data from different columns in an excel sheet and merge them as a string.

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    3

    Extract data from different columns in an excel sheet and merge them as a string.

    Hey all,

    I am trying to extract the country specific data in from the excel sheet and merge the column names Country, Population as a string which will give an output as: "If country= XXX then population = YYY"

    Can anybody help me as i have no idea how to do this.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Extract data from different columns in an excel sheet and merge them as a string.

    hi
    a couple of questions
    are you trying to return a string for every country, or look up a particular country in your sheet and return data from that row?
    also, what do you mean by "population" - none of the data in your sheet is labeled "population"?

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extract data from different columns in an excel sheet and merge them as a string.

    Hi
    am trying to return a string for every country. and column E has population data

  4. #4
    Forum Expert
    Join Date
    06-09-2010
    Location
    Australia
    MS-Off Ver
    Excel 2013
    Posts
    1,714

    Re: Extract data from different columns in an excel sheet and merge them as a string.

    ok, but there are no data in column E in the spreadheet you uploaded

    if the country name is in column A and the population data in column E, this formula dshould return the string you want:

    Please Login or Register  to view this content.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Extract data from different columns in an excel sheet and merge them as a string.

    try this...

    ="If country = "&A6&" Then population = "&E6
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  6. #6
    Registered User
    Join Date
    10-30-2012
    Location
    Boston
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Extract data from different columns in an excel sheet and merge them as a string.

    Thanks, to both of u it worked

+ 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