Presumably you are getting some sort of error message. What does that say? That should be your first clue, and ours. You haven't declared the type of 'c'. What is it and does it have a Text property? Can an Excel.Range be enumerated in that fashion?
Thanks a lot. All cells in this range have numbers. But as they are in Excel, I thought I can get them as String. C is anything as we do in VBA in FOREACH loop. I dont know how can I change all the cell values in this range to a string "-" if the cell value is 0.
There is a whole section in the library with code examples on working with ranges in Excel. After you have tried some of these please repost with more code (and the error message you recieve, please) so that we may help.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.