Basing Macro Code on Cell Values
Posted by Colin on January 08, 2001 12:39 PM
Is it possible for a macro to look through a series of cells and then base the macro code on the results of those cells?
For example, if in column A the first three cells had values:
'(blank)'
'ActiveWorkbook.SaveAs FileName:="C:\WINDOWS\Desktop\GMP Summary\2001.xls"'
'(blank)'
I would then want the macro to save one file.
However, if in column A, the first three cells had values:
'ActiveWorkbook.SaveAs FileName:="C:\WINDOWS\Desktop\GMP Summary\2000.xls"'
'ActiveWorkbook.SaveAs FileName:="C:\WINDOWS\Desktop\GMP Summary\2001.xls"'
'(blank)'
The macro would then save two files.
Also, does it matter if the cell value is text or a formula result?
Thanks again, in advance for any help.
Colin