Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple cells in to one cell x times

I have a list of keywords with names:
Something one
Something two
Something2 one
Something2 two
Something2 three

I need to put keywords to one cell but for every group i need new
cell.
I have something like this:

Sub CosTam()
IleSlow = Worksheets("to").Range("G1").Value
Pierwsza = 1
Druga = 0

Sheets("to").Select

For I = 1 To IleSlow
Roznica = Worksheets("to").Range("G" & I).Value
Druga = Druga + Roznica
Sheets("to").Range("C" & Pierwsza & ":C" & Druga).Select

For Each S In Selection
New_value = New_value & S.Value & ","
S.Value = ""
Next S
Worksheets("to").Range("H" & I).Value = New_value

Pierwsza = Pierwsza + Druga
Next I

End Sub

Its working, but only for first group. Then its not changing Nev_value
and pasting x times same thing.
If any one can halp me, that will be great.

Thanx

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Multiple cells in to one cell x times

Sub CosTam()

LastRow = Cells(Rows.Count, 3).End(xlUp).Row
Set ColCRange = Range(Cells(1, 3), Cells(LastRow, 3))

RowCount = 1
New_value = ""
For Each cell In ColCRange

New_value = New_value & cell.Value & ","
If cell < cell.Offset(rowoffset:=1, columnoffset:=0) Then

Worksheets("to").Range("H" & RowCount).Value = New_value
New_value = ""
RowCount = RowCount + 1
End If

Next cell

End Sub


" wrote:

I have a list of keywords with names:
Something one
Something two
Something2 one
Something2 two
Something2 three

I need to put keywords to one cell but for every group i need new
cell.
I have something like this:

Sub CosTam()
IleSlow = Worksheets("to").Range("G1").Value
Pierwsza = 1
Druga = 0

Sheets("to").Select

For I = 1 To IleSlow
Roznica = Worksheets("to").Range("G" & I).Value
Druga = Druga + Roznica
Sheets("to").Range("C" & Pierwsza & ":C" & Druga).Select

For Each S In Selection
New_value = New_value & S.Value & ","
S.Value = ""
Next S
Worksheets("to").Range("H" & I).Value = New_value

Pierwsza = Pierwsza + Druga
Next I

End Sub

Its working, but only for first group. Then its not changing Nev_value
and pasting x times same thing.
If any one can halp me, that will be great.

Thanx


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Multiple cells in to one cell x times

Thx, but i need to select grops of keywords one by one and every group
put in one cell

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I multiply (1 cell) times a rge of cells to a rge of cells kenny Excel Worksheet Functions 3 February 28th 09 08:07 PM
Extracting Info from within a cell multiple times o1darcie1o Excel Worksheet Functions 1 January 29th 07 06:30 PM
Using SUBSTITUTE multiple times on single cell of data Cameron Excel Discussion (Misc queries) 1 December 6th 06 11:58 PM
how do i copy the same cell multiple times in excel. Andy Excel Discussion (Misc queries) 1 July 7th 06 12:50 AM
Multiple dates, times, or formulas in a single cell PM-S Excel Discussion (Misc queries) 2 January 12th 06 04:19 AM


All times are GMT +1. The time now is 10:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"