need a macro..

  • Thread starter Thread starter Johnny
  • Start date Start date
J

Johnny

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
 
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
 
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.
 
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
 
Back
Top