MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Converting Excel formulas to VB code


Posted by Simon B on November 19, 2001 3:44 AM

Does anyone know if there is a function in Excel / VBA which automatically imports and converts excel formulas into VB code? I appreciate that this may not be possible as auto-generation of variables would be a problem...but if there is a way, I would like to know. I have some nasty multi-nested formulas which need unravelling in VB!

Thanks


Posted by Derek on November 19, 2001 10:15 PM

I don't know if this is what you are looking for but I get my formulas into macro code by recording them. Before recording, I put a space in front of the formula to convert it to text, start recording, select the cell, remove the space and press Enter.