Results 1 to 30 of 30

vba Find a last row, loop down, enter data to cell, check for errors

Threaded View

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    london
    MS-Off Ver
    office 2010
    Posts
    23

    vba Find a last row, loop down, enter data to cell, check for errors

    hi guys need urgent help pls

    I need to find last row in my sheet and and enter the number into the indicated cell, i found how to do with MsgBox, but teacher doesnt want meassage box just a last row number in that cell
    And I have to do with VBA

    then I have to loop down the number of students and enter the total into indicated cell ( total number of students) again with vba. also there is 1 or 2 blank rows, so I have to avoid counting them

    I have to calculate percentage in 2 coloums, i.e colomn a is 5, colomn b 10, i have to loop down and calculate 5/10*100. some rows has "abs" there so I have to edit the code to check for "abs" and avoid it and pick only numbers
    also I have to check the result wit another colum f
    I normally use iferror(colomuna/columb,abs)
    but she wants VBA
    pls help

    last I have to debug following sub to display each students name

    I thank you all

    Sub students_error()
        Dim row As Integer
        Do While ActiveSheet.Cells(row, 2).Value <> ""
        If ActiveSheet.Cells(row, 2).Value <> "" Then
            MsgBox ("Student name #" & row & " is " & ActiveSheet.Cells(row, 2).Value)
            Dim row As Single
            row = row + 1
        Loop
        End If
    End Sub
    Last edited by cili; 07-02-2016 at 07:14 AM.

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