Results 1 to 4 of 4

Is it possible to write an If function within a sub??

Threaded View

  1. #1
    Registered User
    Join Date
    07-25-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2007
    Posts
    10

    Is it possible to write an If function within a sub??

    I am pulling data from one workbook and inputting it into a second, and returning calculations from the seond to the first workbook. I was wondering is it possible to write and If funtion within my sub, so that when a cell I pull from the first workbook goes below a certain value it automatically inputs a certain number

    Application.Goto Workbooks("Paul_Nicholson.xlsm").Sheets("Discharging").Range("Q17")
        formTemp = Range("Q17").Value                               'strings of data from the second workbook
        Range("Q17").Select                                    'puts temp into refprop
        Selection.Copy
    Application.Goto Workbooks("Refprop.xls").Sheets("Examples").Range("A37")
        If(formTemp>=810.77,formTemp,810.77)=Range("A37")
    Want something like this however this does not work
    Last edited by arlu1201; 08-01-2012 at 07:05 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