Solved

MS Excel Query

Posted on 2012-04-10
7
450 Views
Last Modified: 2012-04-12
Hi All,

I am trying to combine 3 columns into 1. I have a column for First Name, Last Name and Middle initial.  My combined cloumn is: Last Name+', '+First Name+' '+Middle initial.

The problem is, if the person does not have a middle initial then nothing is shown.

How do I get My combined column to reflect the Last Name and First name only if no middle initial is present.

Thank you in advance.
0
Comment
Question by:Reyesrj
  • 4
  • 2
7 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 250 total points
ID: 37826538
Let's say, column A stores Last name,  column B stores first name and column C stores middle intial, and the final combined results stored in column D:

Formula in column D:
=A1 & ", " & B1 & IF(C1 <> "",  " " & C1, "")
0
 

Author Comment

by:Reyesrj
ID: 37826628
Thanks, but that's in the spreadsheet.  How do I combine the columns in MS Excel database query?
0
 
LVL 9

Assisted Solution

by:Anthony Mellor
Anthony Mellor earned 250 total points
ID: 37834717
what's the external data file type and source? are you on a pc or mac ? which version excel?

any chance a small data example? easier to play with. edit how big is the data source, hundreds thousands or millions of records? this problem sounds familiar.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 

Author Comment

by:Reyesrj
ID: 37835574
Currently there are about 600 records in Access 2007.  It is anticipated to increase by 100 per week.  I experience this all time.  It’s that blank or NULL field that creates the problem.  What I have done in the past is combine the first name and last name into one column and leave the middle initial in a separate column.   Then combine the combined name column with the middle initial column in the excel table.
Thanks

Sample pic
0
 

Author Comment

by:Reyesrj
ID: 37835623
Sorry, the pic was for my other question.
0
 

Author Closing Comment

by:Reyesrj
ID: 37835863
This is what I found:

In MS Excel Database Query Wizard, you use ampersand "&" instead of a plus sign "+".  So the formula would look like this:

LastName & ', ' & FirstName & ' ' & MiddleName

Thanks to ALL
0
 
LVL 9

Expert Comment

by:Anthony Mellor
ID: 37836333
thanks!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question