Results 1 to 4 of 4

value recalled from cell cannot be used in formula

Threaded View

  1. #1
    Registered User
    Join Date
    01-18-2013
    Location
    Baton Rouge, LA
    MS-Off Ver
    MS Office 2010
    Posts
    25

    value recalled from cell cannot be used in formula

    I recalled a value from a cell in a worksheet and VBA is telling me that it cannot use it. It automatically renamed it and I don't know why. Here is my code:

    'Calculate K factor for fill valve
        If valve_type = "Ball" Then K = Worksheets("Sheet1").Cells(1, 3).Value
        If valve_type = "Globe" Then K = Worksheets("Sheet1").Cells(2, 3).Value
        If valve_type = "Butterfly" Then K = Worksheets("Sheet1").Cells(3, 3).Value
        
        
        'Calculate headloss in fill valve
        hl_fillvalve = K * Colebrook_equation_fillvalve * T_exit_velocity ^ 2 / 2
    It renames the 'K' variable to 'K-factor'. I do not have a variable named 'K-factor' anywhere. How can I fix this?

    Thanks
    Last edited by damayn83; 01-21-2013 at 11:01 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