View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Matthew Herbert[_3_] Matthew Herbert[_3_] is offline
external usenet poster
 
Posts: 149
Default Macro that concatenates content from cells if given keyword is fou

Andrei,

Use a simple IF function in your spreadsheet. So, let's say that cell A1
contains your keyword "mother". In cell D1, put the following formula:

=IF(B1=$A$1,B1&" "&C1,"")

You can then copy the formula down and you should see your desired results.

Best,

Matthew Herbert

"andrei" wrote:


Hello guys !

Here is what i want from a macro

In cells from B column i have from time to time a keyword . The macro
should find that keyword , to concatenate text from that cell with the
text from coresponding cell in C column and put the result in D column
beginning with the first cell . Here is an example :

Keyword = "mother"

B1 = mother C1 = and
B4 = daddy C4 = uncle
B6 = mother C6 = goes
B8 = mother C8 = is
B10 = sister C10= and
B20 = mother C20 = was


The result should be :

D1 = mother and
D2 = Mother goes
D3 = mother is
D4 = mother was

If this macro could work in all sheets , that would be magnific !
Many thanks in advance

PS: Sorry for my bad english :p)


--
andrei
------------------------------------------------------------------------
andrei's Profile: 1056
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=176493

Microsoft Office Help

.