+ Reply to Thread
Results 1 to 3 of 3

Increase Column Heading Part 2

  1. #1
    Adam
    Guest

    Increase Column Heading Part 2

    Starting with the 4th column, I want every third column in the forth row to
    say Substation and then the number. I have set a variable that is the max
    substation number. I can't get this to output anything. Thanks for the help.

    For a = 1 To MaxSubNumber

    columnNum = 4 + (a - 1) * 3
    Cells(4, columnnum_.Value) = "Substation " & a

    Next a

  2. #2
    Martin
    Guest

    RE: Increase Column Heading Part 2

    The second argument of Cells should just be columnNum surely (don't know
    where the _.Value came from)?

    "Adam" wrote:

    > Starting with the 4th column, I want every third column in the forth row to
    > say Substation and then the number. I have set a variable that is the max
    > substation number. I can't get this to output anything. Thanks for the help.
    >
    > For a = 1 To MaxSubNumber
    >
    > columnNum = 4 + (a - 1) * 3
    > Cells(4, columnnum_.Value) = "Substation " & a
    >
    > Next a


  3. #3
    Adam
    Guest

    RE: Increase Column Heading Part 2

    Thank you

    "Martin" wrote:

    > The second argument of Cells should just be columnNum surely (don't know
    > where the _.Value came from)?
    >
    > "Adam" wrote:
    >
    > > Starting with the 4th column, I want every third column in the forth row to
    > > say Substation and then the number. I have set a variable that is the max
    > > substation number. I can't get this to output anything. Thanks for the help.
    > >
    > > For a = 1 To MaxSubNumber
    > >
    > > columnNum = 4 + (a - 1) * 3
    > > Cells(4, columnnum_.Value) = "Substation " & a
    > >
    > > Next a


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1