+ Reply to Thread
Results 1 to 4 of 4

How to get value, not formula

  1. #1
    Registered User
    Join Date
    04-25-2006
    Posts
    8

    How to get value, not formula

    This has got to be easy, but no matter what I try I get a formula instead of a value. What I am trying to do is take the hours in column I and multiply times 60 to put the minutes in column C. So far have the following:

    Sub ConvertMinutes()

    Dim myRng As range
    Dim lastRw As Long
    'get the last row with an entry
    lastRw = ActiveSheet.range("I2").End(xlDown).Row
    With ActiveSheet.range("C2")
    .Value = "=I2*60"
    .AutoFill Destination:=ActiveSheet _
    .range("C2:C" & lastRw&)

    End With
    End Sub


    Any help is appreciated. LAS

  2. #2
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591
    Hi

    Try

    Please Login or Register  to view this content.

    rylo

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    I opened a new sheet, pasted your code and ran it, and I got values. I think you may have a cell formatting issue, namely, the cells in column C are formatted as Text already.

    Change the format of the cells in column C and then run the macro.

  4. #4
    Registered User
    Join Date
    04-25-2006
    Posts
    8

    Thank you!

    Thank you Rylo...I now have values. LAS

+ Reply to Thread

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