+ Reply to Thread
Results 1 to 1 of 1

VBA in Excel: 2nd, last value and in-between rows of a column

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    VBA in Excel: 2nd, last value and in-between rows of a column

    Hello,

    I'd like to know if anyone could help me. I'm looking at how I can write in VBA a macro that generates values for 2nd and last row and rows in between of a particular column 'x' with a few hundred rows (variable length). I would define the values as follows:

    part 1)
    2nd row, column x: value=1 (1st row is title row)
    last row, column x: value=1
    all rows in between: value=n (say n=3)

    part 2)
    In addition, I would also need to use the same sign (either positive or negative) for each row in column x from the corresponding row in column y.

    ** Possible part of solution:
    [code]
    Dim arr As Variant
    arr = Range("G2", Cells(Rows.coUnt, "G").End(xlUp)).Value
    [\code]

    In this case VBA would count the number of rows in column "G".

    Thank you for your advice.
    Last edited by zeno1; 09-20-2012 at 02:27 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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