+ Reply to Thread
Results 1 to 5 of 5

convert formulas and actions to vba code

  1. #1
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    convert formulas and actions to vba code

    Hi every one
    can i convert this below functions and formulas to vba code to run in macro

    Press Ctrl+F3
    New Name : SheetName
    =MID(GET.WORKBOOK(1),FIND("]",GET.WORKBOOK(1))+1,9)


    A2
    =IF(ROWS(A$2:A2)< COUNTA(SheetName),INDEX(SheetName,ROWS(A$2:A2)),"")

    B2
    =IF(A2="","",INDIRECT("'"&A2&"'!h2")&"")

    C2
    =IF(B2="","",SLOPE(INDIRECT("'"&A2&"'!R2:R19"),INDIRECT("'"&A2&"'!Q2:Q19")))

    thank you so much
    wish you all the best

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,632

    Re: convert formulas and actions to vba code

    see yellow banner at the top of the page
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    08-06-2014
    Location
    iran
    MS-Off Ver
    2016
    Posts
    110

    Re: convert formulas and actions to vba code

    hi
    xslb format file was attached
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,213

    Re: convert formulas and actions to vba code

    Please try

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,632

    Re: convert formulas and actions to vba code

    Hi Bo_ry,
    The code is almost exactly what I started writing once I saw the sample file.
    The only minor difference would be that instead of using
    Please Login or Register  to view this content.
    I'd probably use Slope in context of application:
    Please Login or Register  to view this content.
    thus getting a #DIV/0! error message in a cell (but not breaking code excecution) or testing the content of H2 and skipping the sheet if it's empty.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need code to do this series of actions ...
    By zextrot in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2017, 02:29 PM
  2. Convert formulas a vba code
    By leprince2007 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-14-2017, 06:46 PM
  3. [SOLVED] Convert Formulas to VBA Code
    By KumarPK in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 04-30-2015, 07:54 AM
  4. vba code to convert formulas into text.
    By winmaxservices1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-05-2015, 04:31 AM
  5. VBA code help - several actions in one code + declaring and using a variable
    By anthrax899 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-23-2013, 09:48 AM
  6. Convert csv to xls with other actions
    By evanhughes in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-21-2011, 07:13 PM
  7. Replies: 0
    Last Post: 05-10-2005, 04:06 AM

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