Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
 
Posts: n/a
Default Simple Excel operation, help needed

Hi there,

I have text strings in column A and corresponding text strings in
column B.

Some text strings in column A are duplicate.

I want for those duplicate text strings that are in column A to have
the same corresponding text strings in column B automatically added.

How can I do that?

Regards,
Alexa

  #2   Report Post  
CLR
 
Posts: n/a
Default

Not sure, are you talking about CONCATENATION?..........if so, in C1 put
this and copy down.......

=A1&" "&B1

Vaya con Dios,
Chuck, CABGx3


wrote in message
oups.com...
Hi there,

I have text strings in column A and corresponding text strings in
column B.

Some text strings in column A are duplicate.

I want for those duplicate text strings that are in column A to have
the same corresponding text strings in column B automatically added.

How can I do that?

Regards,
Alexa



  #3   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

Alexa,

Explain what you mean by "corresponding." You might need to give us a small
sample of your data. Show the before and the after.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

wrote in message
oups.com...
Hi there,

I have text strings in column A and corresponding text strings in
column B.

Some text strings in column A are duplicate.

I want for those duplicate text strings that are in column A to have
the same corresponding text strings in column B automatically added.

How can I do that?

Regards,
Alexa



  #4   Report Post  
Sandy Mann
 
Posts: n/a
Default

Alexa,

Like Chuck, I'm not sure either but I read it slightly differently. I
thought that you were saying that there was text in Columns A and B with
duplicates in Column A but not all duplicates in Column A had the text in
Column B. The question then was how to fill in the missing text in Column
B. If so then this code should do the necessary.

Option Explicit
Sub FillIn()

Dim c As Long, s As Long, x As Long, y As Long
Dim LookFor As String, LookTo As String

Application.ScreenUpdating = False

c = Application.CountA(Range("A:A"))
'If there is other data further down in Column A
'restrict the range in A:A

Range("A1:A" & c).AdvancedFilter _
Action:=xlFilterCopy, CopyToRange:=Range( _
"Z1"), Unique:=True

s = Application.CountA(Range("Z:Z"))
'If there is data in Column Z change the range
'with all the corresponding Z references in the code

For x = 2 To s

LookFor = Cells(x, "Z").Value

For y = 2 To c
If Cells(y, 1).Value = LookFor Then
If Cells(y, 2).Value < "" Then
LookTo = Cells(y, 2).Value
Exit For
End If
End If
Next y

For y = 2 To c
If Cells(y, 2).Value = "" Then
If Cells(y, 1).Value = LookFor Then
Cells(y, 2).Value = LookTo
End If
End If
Next y

Next x

Range("Z1:Z" & s).Value = ""

Application.ScreenUpdating = True

End Sub

HTH

Sandy

--
to e-mail direct replace @mailinator.com with @tiscali.co.uk


wrote in message
oups.com...
Hi there,

I have text strings in column A and corresponding text strings in
column B.

Some text strings in column A are duplicate.

I want for those duplicate text strings that are in column A to have
the same corresponding text strings in column B automatically added.

How can I do that?

Regards,
Alexa




  #5   Report Post  
 
Posts: n/a
Default

Here are the text strings in columns A and B:

Rows Column A Column B

Row 1 string1 stringA
Row 2 string2 stringB
Row 3 string3 stringC
Row 4 string1
Row 5 string4 stringD
Row 6 string3

Rows 4 and 6 doesn't have any data in column B.

I want excel to place stringA in Row4,ColumnB and stringC in
Row6,ColumnB because in previous rows Column A strings have these
strings in Column B..

How can I automate this with Excel?

Regards,
Alexa



  #6   Report Post  
 
Posts: n/a
Default

Hi Sandy,

Can you give exact instructions where I should place this code?

Regards,
Alexa

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
Excel error - Startup (and Acrobat PDFMaker) gxdata Setting up and Configuration of Excel 0 February 4th 05 03:44 AM
How can I use Excel as a simple database for Quoting? Stefan Excel Discussion (Misc queries) 1 January 4th 05 01:26 PM
How do I convert an existing MS Excel worksheet tracking a simple. NOTANYJOE Excel Discussion (Misc queries) 1 January 4th 05 02:07 AM
How do I convert an existing MS Excel worksheet tracking a simple. [email protected] Excel Discussion (Misc queries) 0 January 4th 05 12:53 AM
Help needed with textbox formatting in Excel 2000 JIMBROOKS Excel Discussion (Misc queries) 1 January 1st 05 03:33 PM


All times are GMT +1. The time now is 11:25 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"