Results 1 to 11 of 11

Putting value instead of formula itself using VBA code

Threaded View

goels Putting value instead of... 12-12-2011, 09:54 AM
tom1977 Re: Putting value instead of... 12-12-2011, 10:08 AM
goels Re: Putting value instead of... 12-12-2011, 10:55 AM
arlu1201 Re: Putting value instead of... 12-12-2011, 02:55 PM
goels Re: Putting value instead of... 12-12-2011, 03:19 PM
arlu1201 Re: Putting value instead of... 12-12-2011, 03:33 PM
arlu1201 Re: Putting value instead of... 12-12-2011, 03:31 PM
goels Re: Putting value instead of... 12-16-2011, 09:52 AM
goels Re: Putting value instead of... 12-16-2011, 10:11 AM
huuthang_bd Re: Putting value instead of... 12-16-2011, 11:58 AM
goels Re: Putting value instead of... 12-16-2011, 12:41 PM
  1. #1
    Registered User
    Join Date
    10-31-2010
    Location
    London
    MS-Off Ver
    Excel 2007, Excel 2010
    Posts
    56

    Putting value instead of formula itself using VBA code

    Hi All,

    I have the following code which puts the formula in rows J2 to J5000. What I want to do though is place the calculation result of the formulas in rows J2 to J5000. How can I do that?

    Sub pl()
    
        Sheets("Data").Select
        Range("J2").Select
        ActiveCell.Formula = _
            "=IF(A2="""","""",IF(OR(D2=1,F2=1),999999,ABS((D2*E2)/(F2*G2))))"
           Selection.AutoFill Destination:=Range("J2:J5000"), Type:=xlFillDefault
           
       End Sub
    So for eg currently it places in cell J2 =IF(A2="","",IF(OR(D2=1,F2=1),999999,ABS((D2*E2)/(F2*G2)))) which calculates to say 4. I just want it to place value 4 in cell J2 without the formula.

    Thanks
    Last edited by goels; 12-16-2011 at 12:42 PM.

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