#1
|
|||
|
|||
How I convert formua into VBA code I need help
Code:
=IF('8'!D17,'8'!D17,"NO TEAM") Thanks You |
#2
|
|||
|
|||
Place your cursor in the cell with the formula, turn on the macro recorder, press F2 and then press tab. Now turn off the macro recorder. Open up the VBE and the code will be there.
Or simply, copy and paste (Note: I also adjusted your formula a tad) Code:
Sub MyFormula() Range("D1").Formula = "=IF('8'!D17<>"""",'8'!D17,""NO TEAM"")" End Sub Also, the first method will record the formula in R1C1 notation. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Code to convert numbers to superscript | SidCharming | Word VBA | 2 | 08-09-2018 08:21 AM |
VBA code to convert Heading 1, 2, 3 etc. numbering | Lady_Laughsalot | Word VBA | 4 | 04-18-2018 12:32 AM |
VBA Code to search for field codes with certain text before the Field code and to change style | welcometocandyland | Word VBA | 4 | 02-08-2017 06:53 PM |
Macro to convert table to convert table into iCalendar file? | Weboh | Word VBA | 5 | 12-10-2016 03:07 PM |
how to convert .wps to .doc | ret_squid | Word | 1 | 08-11-2016 09:03 PM |