ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to combin rows. (https://www.excelbanter.com/excel-discussion-misc-queries/167497-how-combin-rows.html)

Johnny

How to combin rows.
 
anyone know how create like look at all columns and fnd text then combin that
row and put it in different column.
like this is what I need, but this only can do it in the same row:
=IF(D125="FISH",A1&","&B1&","&C1&","&D1&","&E1,"")

exsample: there are many rows that has (fish), I want to look at all columns
and find the rows has(fish), combin that row, and by order put it at column
M1,M2,M3....

Don Guillett

How to combin rows.
 

Look in the vba help index for FINDNEXT.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Johnny" wrote in message
...
anyone know how create like look at all columns and fnd text then combin
that
row and put it in different column.
like this is what I need, but this only can do it in the same row:
=IF(D125="FISH",A1&","&B1&","&C1&","&D1&","&E1,"")

exsample: there are many rows that has (fish), I want to look at all
columns
and find the rows has(fish), combin that row, and by order put it at
column
M1,M2,M3....



Herbert Seidenberg

How to combin rows.
 
Or use Advanced Filter...
Assume your data looks like this:
dat1 dat2 dat3 dat4 dat5 bin1 bin2 bin3 bin4 bin5
A S C E N
S A L M O fish
T R O U T fish
R C U L H
C A T F I fish
and you want to filter the rows that contain "fish".
Create this criteria:
bin1 bin2 bin3 bin4 bin5
fish
fish
fish
fish
fish
List Range: A1:J6 (all columns must have labels)
Criteria: A7:E12 (can be placed anywhere)
Copy to: M1 (or anyplace)
The result will look like this:
dat1 dat2 dat3 dat4 dat5
S A L M O
T R O U T
C A T F I
Concatenate as usual.


All times are GMT +1. The time now is 02:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com