From: Donna on 20 Apr 2010 17:44 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
From: Mike on 20 Apr 2010 18:21 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
From: Donna on 20 Apr 2010 19:11 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
From: Max on 20 Apr 2010 19:24 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
From: Mike on 20 Apr 2010 19:28
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 |