Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
need a macro..
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 |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
need a macro..
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 |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
need a macro..
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 |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
using a cell value to control a counter inside a macro and displaying macro value | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |