Thread: need a macro..
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default need a macro..

Okay, do it like this:

=IF(D1="FISH",A1&","&B1&","&C1&","&D1&","&E1,"")

and copy down as before. Alternatively, put the word FISH (or any
other word) in M1 and make the formula:

=IF(D1=M1,A1&","&B1&","&C1&","&D1&","&E1,"")

Hope this helps.

Pete

On Nov 23, 8:39 pm, Johnny wrote:
Hi Pete,
this=A1&","&B1&","&C1&","&D1&","&E1
is samething what I did so far, but I need is a macro or formula. becouse
the information that I need to combin is in the diffrent rows everytime of my
spreadsheet . so I am looking for a macro, like look at the all columns and
find something like column D Fish(every time there is a word Fish in columns
D) and create a macro or formula to combin that row information from A-E.

anyone know how to do it pls help.



"Pete_UK" wrote:
You could enter this formula in F1:


=A1&","&B1&","&C1&","&D1&","&E1


and copy down the column. If you want to be left with just this,
highlight the formula cells in column F, click <copy then Edit |
Paste Special | Values (check) | OK followed by <Enter - then you can
delete columns A to E.


Hope this helps.


Pete


On Nov 23, 7:33 pm, Johnny wrote:
my problem is how to create a macro to combin columns(A-E), sometime in
diffrent rows.
this is the sample:
A B C D E
------------------------------------------------------------------------
N6M1(4418 271 -1G)M2(18540 FISH 2589pcs


I want a macro to combin A-E and add a (,)between each columns.
looks like this:N6M1(4418,271,-1G)M2(18540,FISH,2589pcs- Hide quoted text -


- Show quoted text -