Solved

MS Excel Query

Posted on 2012-04-10
7
463 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

691 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