A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

combining columns and using concatenate



 
 
Thread Tools Display Modes
  #1  
Old April 20th, 2010, 10:44 PM posted to microsoft.public.excel.worksheet.functions
Donna[_5_]
external usenet poster
 
Posts: 69
Default combining columns and using concatenate

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
  #2  
Old April 20th, 2010, 11:21 PM posted to microsoft.public.excel.worksheet.functions
mike
external usenet poster
 
Posts: 3,942
Default combining columns and using concatenate

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

  #3  
Old April 21st, 2010, 12:11 AM posted to microsoft.public.excel.worksheet.functions
Donna[_5_]
external usenet poster
 
Posts: 69
Default combining columns and using concatenate

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

  #4  
Old April 21st, 2010, 12:24 AM posted to microsoft.public.excel.worksheet.functions
Max
external usenet poster
 
Posts: 8,574
Default combining columns and using concatenate

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


  #5  
Old April 21st, 2010, 12:28 AM posted to microsoft.public.excel.worksheet.functions
mike
external usenet poster
 
Posts: 3,942
Default combining columns and using concatenate

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

  #6  
Old April 21st, 2010, 12:46 AM posted to microsoft.public.excel.worksheet.functions
Donna[_5_]
external usenet poster
 
Posts: 69
Default combining columns and using concatenate

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


 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:28 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.