Results 1 to 3 of 3

for every line I browse make a count and post this count in a cell (fiouuu)

Threaded View

  1. #1
    Registered User
    Join Date
    03-29-2013
    Location
    milan
    MS-Off Ver
    Excel 2007
    Posts
    4

    for every line I browse make a count and post this count in a cell (fiouuu)

    Hello,

    All starts in the column R
    For every line in this column (precisely from line R13 to R56)
    I am trying to count the columns not empty from colum X to column AB and this for each row.
    And for each count Ido I would like to post the result for this line in the column R.

    Theres nothing better than a good example=)

    For example:
    Starts at R13 and checks from X13 to AB13 how many Cells are filled (not empty). And then post the number (the count) in R13.
    Then on R14 it checks from X14 to AB14 how many Cells are filled. And then post the number (the count) in R14.
    Then on R15 it checks from X15 to AB15 how many Cells are filled. And then post the number (the count) in R15.

    The same process until R56...

    I am very new at vba but here is what I tried to do:

    'Step 1 I say to my program to brows all the lines (GRC is my range from R13 to R56)[/COLOR]
    For J = 1 To GCR.Count

    'Step 2 for each row I do a count that I call nbcells
    nbcells = Application.WorksheetFunction.Count(GCR.Range("J, 1"))

    'Step 3 I copy past the result in the line[/COLOR]
    GCR.Cells(J, 1).Copy
    GCR.Cells(J, 1).PasteSpecial xlPasteValues
    Next J

    I think I have a problem to select my column in step 2.

    Well if somebody has some hint (the simpler the better) it will be greatly appriciated.

    Thanks for reading and have a great day.
    Last edited by historic777; 03-30-2013 at 06:43 AM.

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