Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 76
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
CONCATENATE TWO COLUMNS The Cable Guy Excel Worksheet Functions 3 December 16th 09 04:37 AM
Combining Text from 2 Columns into 1 then Deleting the 2 Columns sleepindogg Excel Worksheet Functions 5 September 19th 08 12:36 AM
combining two rows of data into one (Not Concatenate) Dr Gonzo Excel Discussion (Misc queries) 1 October 24th 07 06:37 PM
Combining two formulas using concatenate Confused Kate Excel Worksheet Functions 3 September 21st 06 04:13 AM
Concatenate two columns? uma Excel Worksheet Functions 1 April 19th 06 09:46 AM


All times are GMT +1. The time now is 07:21 AM.

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

About Us

"It's about Microsoft Excel"