Originally Posted by
VBA Noob
Please read forum rules below and wrap your code
Thanks
VBA Noob
I'm sorry I didn't realise I had to wrap it as it was the line already wrapped in code tags in the pre-entered post - Apologies VBA Noob.
I have tried these two suggestions (thanks VBA Noob & Mudraker ) but it still bombs out. I think the problem may be that the formula is going in as actual text (rather than the formatting of it as text if that makes sense) - by this I mean, the Addcols(g) which may be a value of 4 is going in as
but should go in as..
I HAVE NOW FIXED THIS BIT BY CHANGING CODE TO READ...
To explain a little more background to what I am actually doing....(not sure if it helps at all but here goes)..
My loop is checking a sheet for a heading (Blankcol) and if it finds it, it puts in a blank column. It should also colour it yellow as it then will become a total column of previous columns depending on the heading - for example, if the heading (variable BlankCol) matches and it is to add up the previous 4 columns (AddCol is value 4 at the time in the loop), it should change format to general and put in the formula to add up the previous 4 columns...
**** I THINK I HAVE THE ORDER OF WHAT I WANT TO DO WRONG....**** PLEASE ignore this message until I come back as I think I need to mess with it more then will come back if it still does not work...
dugong
Bookmarks