Results 1 to 3 of 3

Passing in values

Threaded View

  1. #1
    Registered User
    Join Date
    06-26-2007
    Posts
    36

    Passing in values

    Hi,

    i have attached parts of my code which is not doing properly as i am not sure which part of it is wrong.
    Sub Histogram(YearFrom, YearTo, ET, BL)
    
    Dim lastrowBis, rowBis, ff, fi, YF, YT, fo As Long
    Dim netlossamtis As Currency
    
    lastrowBis = 0
        lastrowBis = ActiveWorkbook.Sheets("Data").UsedRange.Rows.Count
    
        For rowBis = 2 To lastrowBis
        
    fi = (YearTo - YearFrom) + 1
    fo = ActiveWorkbook.Sheets("Data").Cells(rowBis, 12).Value
    ff = (fo * fi) 'suppose to multiply fo and fi
            
    netlossamtis = ActiveWorkbook.Sheets("Data").Cells(rowBis, 13).Value
                    
            Select Case netlossamtis
                Case 0.01 To 1000#
                    a = a + ff
                Case 1000.01 To 2000#
                    b = b + ff
                Case 2000.01 To 3000#
                    c = c + ff
                Case 3000.01 To 4000#
                    d = d + ff
    ........ End Select... 
    ........ Next rowBis...
    It does not seems to be able to calculate ff

    http://www.mrexcel.com/board2/viewto...364790#1364790
    Last edited by froggy19; 07-19-2007 at 03:47 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