+ Reply to Thread
Results 1 to 5 of 5

Change IF function to macro

  1. #1
    Registered User
    Join Date
    02-24-2007
    Posts
    84

    Wink Change IF function to macro

    I'm runnig a spreadsheet and I'd like to move from using an IF function (with other nested functions) to a macro.

    The current function is:

    =IF(F188="","",LOOKUP(ROUNDUP((F188/(LOOKUP(D188,'Calc Sheet'!F:F,'Calc Sheet'!H:H))),0),'Calc Sheet'!K:K,'Calc Sheet'!J:J))

    I'd like to have this as a macro so that as data is put into column F, the macro completes the function auomatically.

    Thanks for any advice.

    Gavin.

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523
    Quote Originally Posted by gavster
    I'm runnig a spreadsheet and I'd like to move from using an IF function (with other nested functions) to a macro.

    The current function is:

    =IF(F188="","",LOOKUP(ROUNDUP((F188/(LOOKUP(D188,'Calc Sheet'!F:F,'Calc Sheet'!H:H))),0),'Calc Sheet'!K:K,'Calc Sheet'!J:J))

    I'd like to have this as a macro so that as data is put into column F, the macro completes the function auomatically.

    Thanks for any advice.

    Gavin.
    Hi Gavin,
    Does your function work for you as it is written?
    Could you attach a sample workbook with the working function?

  3. #3
    Registered User
    Join Date
    02-24-2007
    Posts
    84
    Dave,

    Yes the functions works as it currently is.

    I've already got a macro running on that page doing several fubnctions, and would like to ideally add this in as a sub-routine.

    Thanks,
    Gavin.
    Attached Files Attached Files

  4. #4
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,523
    This bit of code will add the formula to the next column when you have made as change in Column F
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-24-2007
    Posts
    84
    Thanks Dave.

    It works blindingly well.

+ 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