LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 394
Default Amend Code Help Please

Hi everyone,

I have the following code ...

Option Explicit
Option Base 1

Public Sub Test()
Dim RowData As Range
Dim C As Long
Dim CombData As String
Dim CombNum As Integer

CombNum = 1 <---------
For Each RowData In ActiveSheet.UsedRange.Rows
With RowData
If C 0 Then CombNum = CombNum + 1
CombData = ""
For C = 1 To 5
CombData = CombData & .Cells(1, C).Value & ","
Next C
CombData = CombData & .Cells(1, 6).Value
Debug.Print "Set " & CombNum & "," & CombData
End With
Next RowData

End Sub

.... which does produce the right information in the right format.
I would like to amend the code to pick up the groups on a sheet named
"Groups" and in Cells "B3:G?". The groups could be 1 to whatever.
The other thing is that I have had to set the CombNum to 1 when I
think it should start at zero.
If there is a better way to code this I would appreciate any pointers.

Thanks in dvance.
All the Best.
Paul

 
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
amend a VB code please Morgan Excel Discussion (Misc queries) 0 March 3rd 10 11:17 PM
Amend the Code shan_in_dubai Excel Programming 1 July 19th 05 09:36 AM
Amend code gavmer[_75_] Excel Programming 1 September 22nd 04 12:57 AM
Amend code or change it completely? Gareth[_3_] Excel Programming 2 December 1st 03 07:24 PM
Amend form code to allow an option Stuart[_5_] Excel Programming 3 October 23rd 03 08:11 PM


All times are GMT +1. The time now is 08:20 PM.

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

About Us

"It's about Microsoft Excel"