+ Reply to Thread
Results 1 to 4 of 4

formula writen as vba

  1. #1
    Registered User
    Join Date
    04-24-2007
    Posts
    4

    formula writen as vba

    Would it be possible to write this formula as vba code?

    =IF(AND(C$4>=Sheet2!$C1,Sheet1!C$4<=Sheet2!$D1),Sheet2!$B1,"")

    I have used this formula and copied it from C5 across and down to BC1004

    which as made the spreadsheet quite large. If it was writen as vba code

    would this reduce the size of the spreadsheet, if so, would anyone know how

    to do it?

    Many thanks
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    You can try with this code:

    Please Login or Register  to view this content.
    The file size will be less but you need to remember to run macro each time you change data on sheet2.

    To avoid to remember you can use this code on sheet2 to automatically call Macro1 each time you change data on Sheet2:
    Please Login or Register  to view this content.
    Regards,
    Antonio

  3. #3
    Registered User
    Join Date
    04-24-2007
    Posts
    4
    Antonio thats brilliant, thank you very much

  4. #4
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Glad to know it helped.

    Regards,
    Antonio

+ 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