none
Macro help RRS feed

  • Question

  • Hello Sir,

    I have a list of formulae. I want it to be converted to VBA macro. Could you please help me on this? thank you.

    Column A = =C6&LEFT(P6,3)&E6&B6

    Column I = drop down (A,B,C)

    Column J = drop down (A,B,C)

    Column L = drop down (A,B,C)

    Column N = drop down (A,B,C)

    Column Q = =IF(G6,HOUR(H6-G6)+MINUTE(H6-G6)/60+SECOND(H6-G6)/3600,"")

    Column S = =IF(M6="","",WORKDAY(M6,2))

    Column T = drop down (A,B,C)

    Column AI = =AH6<>""

    Column AJ  = drop down (A,B,C)

    Column AR = drop down (A,B,C)

    Column AV = =IF(AK6="E","Procurement type E",IF(AR6<>"","Clarification sent",""))

    Column AW = =IF(ISERROR(VLOOKUP(AV6,Sheet2!C:D,2,0)),"",VLOOKUP(AV6,Sheet2!C:D,2,0))

    Can these conditions be transferred to macro? Awaiting for your kind response.

    Thanks in advance!

    Wednesday, November 25, 2015 9:18 AM

Answers

  • >>>I have a list of formulae. I want it to be converted to VBA macro. Could you please help me on this? thank you.

    According to your description, I suggest that you could use the Macro Recorder.

    Recording macros is the easiest, most common way to create macros. Alternatively, you can manually create your own macros without recording. When you press the Record button, the tasks you perform, the windows and tools used, and so forth are recorded as macro code. You can also use CTRL+SHIFT+R to start or stop recording a macro.

    After you record a macro, you can examine what it recorded and even change it. If the resultant macro does not do exactly what you want it to do, or if you want to add additional functionality, you can edit it after recording and customize the resultant code.

    For more information, click here to refer about Getting Started with VBA in Excel 2010

    • Marked as answer by David_JunFeng Monday, December 7, 2015 3:21 PM
    Monday, November 30, 2015 2:41 AM

All replies

  • Hi,

    This is the forum to discuss questions and feedback for Microsoft Excel, I'll move your question to the MSDN forum for Excel

    http://social.msdn.microsoft.com/Forums/en-US/home?forum=exceldev&filter=alltypes&sort=lastpostdesc

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.

    George Zhao
    TechNet Community Support


    Please mark the reply as an answer if you find it is helpful.

    If you have feedback for TechNet Support, contact tnmff@microsoft.com.
    Thursday, November 26, 2015 1:55 AM
  • >>>I have a list of formulae. I want it to be converted to VBA macro. Could you please help me on this? thank you.

    According to your description, I suggest that you could use the Macro Recorder.

    Recording macros is the easiest, most common way to create macros. Alternatively, you can manually create your own macros without recording. When you press the Record button, the tasks you perform, the windows and tools used, and so forth are recorded as macro code. You can also use CTRL+SHIFT+R to start or stop recording a macro.

    After you record a macro, you can examine what it recorded and even change it. If the resultant macro does not do exactly what you want it to do, or if you want to add additional functionality, you can edit it after recording and customize the resultant code.

    For more information, click here to refer about Getting Started with VBA in Excel 2010

    • Marked as answer by David_JunFeng Monday, December 7, 2015 3:21 PM
    Monday, November 30, 2015 2:41 AM