+ Reply to Thread
Results 1 to 4 of 4

Thread: multiple rows display

  1. #1
    Registered User
    Join Date
    10-20-2011
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    4

    Lightbulb multiple rows display

    Hi everyone,

    I have one problem to solve.
    I have numerical data in columns (one column is one subject) and those data are the test marks (0-5). I have 90 rows with those those marks. What I would like to do is to get numbers of every rows with same mark e.g. 3. It is important that I don't get row's number one by one. I need them in line (2, 3, 6, 9, 11, 15...)

    Thank you in advance!

    Nenad
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    895

    Re: multiple rows display

    try this

    Sub aaa()
    Dim myrange As Range
    Dim l As Integer
    Dim k As Variant
    
    l = Cells(Rows.Count, "a").End(xlUp).Row
    
    Set myrange = Range("a1:b" & l)
    For Each k In myrange
    If k.Value = 3 Then
    Range("c1") = Range("c1") & k.Row & ","
    End If
    Next
    End Sub
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  3. #3
    Valued Forum Contributor
    Join Date
    05-23-2011
    Location
    Lahore PK
    MS-Off Ver
    Excel 2007
    Posts
    615

    Re: multiple rows display

    see attatchment
    Attached Files Attached Files
    Azam
    If you want to say Thank you to a member, click the reputation icon (Star) in the left bottom of the post.
    For prompt answer, be descriptive, concise, short, direct, and to-the-point.

  4. #4
    Registered User
    Join Date
    10-20-2011
    Location
    Hamburg, Germany
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: multiple rows display

    Thank you a lot guys! :D I really appreciate your help! I will use second solution it is easier for me!

    All Best!

+ 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.2.0