Hi Srikanth,
Your post is not very clear, but I think you are saying that the If Cell E4<>0,Sum($E$3:E4) code is going to be in another macro (or part of the macro). If it is set up the same way as the one you posted, it won't work because the macro converts it to a value BEFORE writing to the cell. (the .value = .value code).
Try removing the .value =.value code from the WITH statement. This will cause the formula to be written to the cell instead of the value. I assume you don't want the formula there, so AFTER the with statement, select the range and convert it to values. Something like this:
Hope this helps!
Regards,
David
Please remember, your request is clearer if you attach a sample workbook.
- Click on Go Advanced and click on the Paper Clip.
When you reply please make it clear WHO you are responding to by mentioning their name.
If this has been of assistance, please advise. A little thanks goes a long way.
- Please click on the *Add Reputation button at the bottom of helpful responses.
Please mark your thread as SOLVED:
- Click Thread Tools above your first post, select "Mark your thread as Solved".
Bookmarks