PC Review


Reply
Thread Tools Rate Thread

combining columns and using concatenate

 
 
Donna
Guest
Posts: n/a
 
      20th Apr 2010
I would greatly appreciate your time in looking at this.
I have 2 questions.
The first is:
I have 2 columns A and B. Many of the cells are blank in column B. When
column B has information in it, I want it to replace the information in Col A
with the information from Col B-if col B is blank, then keep the
information from Col A.
My second question is how do I insert a -(hyphen) between information when
I am using Concatenate to combine 3 columns (columns A, B & C).
Thanks
 
Reply With Quote
 
 
 
 
Mike
Guest
Posts: n/a
 
      20th Apr 2010
Without using some vba code i dont think your first question can be done.
Answer to your secon question, can be done like this
=CONCATENATE(A1,"-",B1,"-",C1)
or
=A1&"-"&B1&"-"&C1
"Donna" wrote:

> I would greatly appreciate your time in looking at this.
> I have 2 questions.
> The first is:
> I have 2 columns A and B. Many of the cells are blank in column B. When
> column B has information in it, I want it to replace the information in Col A
> with the information from Col B-if col B is blank, then keep the
> information from Col A.
> My second question is how do I insert a -(hyphen) between information when
> I am using Concatenate to combine 3 columns (columns A, B & C).
> Thanks

 
Reply With Quote
 
Donna
Guest
Posts: n/a
 
      21st Apr 2010
Hi Mike,
Thanks for your reply. The Concatenate parts works, thanks. As for the 1st
part of the question, I will be using a macro, so if you could tell me what
it the visual basic for this part would be I think I could figure out how to
insert it.
Thanks

> > I have 2 columns A and B. Many of the cells are blank in column B. When
> > column B has information in it, I want it to replace the information in Col A
> > with the information from Col B-if col B is blank, then keep the
> > information from Col A.


"Mike" wrote:

> Without using some vba code i dont think your first question can be done.
> Answer to your secon question, can be done like this
> =CONCATENATE(A1,"-",B1,"-",C1)
> or
> =A1&"-"&B1&"-"&C1
> "Donna" wrote:
>
> > I would greatly appreciate your time in looking at this.
> > I have 2 questions.
> > The first is:
> > I have 2 columns A and B. Many of the cells are blank in column B. When
> > column B has information in it, I want it to replace the information in Col A
> > with the information from Col B-if col B is blank, then keep the
> > information from Col A.
> > My second question is how do I insert a -(hyphen) between information when
> > I am using Concatenate to combine 3 columns (columns A, B & C).
> > Thanks

 
Reply With Quote
 
Max
Guest
Posts: n/a
 
      21st Apr 2010
On the face of it, think you could try this
Put in say, D2: =IF(A2="","",IF(B2<>"",B2,A2))
Copy D2 down to return required results. Then copy col D and overwrite col A
with a paste special as values. Clear col D. You're done in about 10-15 secs.
Inspiring? hit the YES below
--
Max
Singapore
---
> > > I have 2 columns A and B. Many of the cells are blank in column B. When
> > > column B has information in it, I want it to replace the information in Col A
> > > with the information from Col B-if col B is blank, then keep the
> > > information from Col A


 
Reply With Quote
 
Mike
Guest
Posts: n/a
 
      21st Apr 2010
This might give you some idea's
Sub test()
For i = 1 To Cells(Rows.Count, 1).End(xlUp).Row
If Range("B" & i).Value > "" Then
Range("A" & i).Value = Range("B" & i).Value
End If
Next
End Sub

"Donna" wrote:

> Hi Mike,
> Thanks for your reply. The Concatenate parts works, thanks. As for the 1st
> part of the question, I will be using a macro, so if you could tell me what
> it the visual basic for this part would be I think I could figure out how to
> insert it.
> Thanks
>
> > > I have 2 columns A and B. Many of the cells are blank in column B. When
> > > column B has information in it, I want it to replace the information in Col A
> > > with the information from Col B-if col B is blank, then keep the
> > > information from Col A.

>
> "Mike" wrote:
>
> > Without using some vba code i dont think your first question can be done.
> > Answer to your secon question, can be done like this
> > =CONCATENATE(A1,"-",B1,"-",C1)
> > or
> > =A1&"-"&B1&"-"&C1
> > "Donna" wrote:
> >
> > > I would greatly appreciate your time in looking at this.
> > > I have 2 questions.
> > > The first is:
> > > I have 2 columns A and B. Many of the cells are blank in column B. When
> > > column B has information in it, I want it to replace the information in Col A
> > > with the information from Col B-if col B is blank, then keep the
> > > information from Col A.
> > > My second question is how do I insert a -(hyphen) between information when
> > > I am using Concatenate to combine 3 columns (columns A, B & C).
> > > Thanks

 
Reply With Quote
 
Donna
Guest
Posts: n/a
 
      21st Apr 2010
Yes, that worked great. Thank you soooo much.
"Max" wrote:

> On the face of it, think you could try this
> Put in say, D2: =IF(A2="","",IF(B2<>"",B2,A2))
> Copy D2 down to return required results. Then copy col D and overwrite col A
> with a paste special as values. Clear col D. You're done in about 10-15 secs.
> Inspiring? hit the YES below
> --
> Max
> Singapore
> ---
> > > > I have 2 columns A and B. Many of the cells are blank in column B. When
> > > > column B has information in it, I want it to replace the information in Col A
> > > > with the information from Col B-if col B is blank, then keep the
> > > > information from Col A

>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining rows with duplicate names - sum numeric, concatenate str Dina Microsoft Excel Misc 0 2nd Mar 2010 10:21 PM
combining two rows of data into one (Not Concatenate) =?Utf-8?B?RHIgR29uem8=?= Microsoft Excel Misc 1 24th Oct 2007 06:37 PM
2000 MsACCESS concatenate: Combining multiple rows into one row =?Utf-8?B?c3NvcGhhYg==?= Microsoft Access Queries 1 4th Jan 2007 06:47 AM
Combining two formulas using concatenate =?Utf-8?B?Q29uZnVzZWQgS2F0ZQ==?= Microsoft Excel Worksheet Functions 3 21st Sep 2006 04:13 AM
Combining Text/Concatenate question Alison Microsoft Excel Worksheet Functions 1 12th Feb 2004 04:56 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:33 PM.