LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Maintaining formula while clearing the cell

I am working with VSTO with C#. My worksheet has 10 Columns and many nows.
Some of the cell contains formula and other are populated with data from the
data source.I define formating, formulas and fill in all cells with 0s
(where there is no formula). I have to compute Meaid across the column for
each row. When I load the data, it dictates whether I will have 2 or 4 or
all 10 columns filled in. Once I load the data (lets say 4 columns),
programatically I clear the remaining 6 columns. All works fine until this
point. If I change some parameter and reload the data in the same session,
and lets say it has (5 columns) more than 4 columns this time, all the cells
, which had formula, for 5th columns, remains null. Data load is just fine.
The reason for this issue is that when I cleared the 6 columns during my
first data loas, it cleared my formula too.

My quesitons is how can I maitain/keep the formula, which I set in the
Excel, whiling Clearing the cell programtically. As I said I am using C#
with VSTO and using Excel object model;s Range.Clear() method to clear the
cell.

Help greatly appreiciated!!
-Sharad


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Clearing content from a cell (or a group) but retain its formula Dr. Dirk Excel Discussion (Misc queries) 2 January 19th 10 10:25 PM
Maintaining a formula in a cell when there was an insert row Devin Excel Discussion (Misc queries) 2 March 10th 06 07:15 PM
Maintaining Formula after adding a new row shaught New Users to Excel 1 January 24th 06 09:05 PM
clearing a cell and keeping the formula genevieveg New Users to Excel 5 January 12th 06 01:33 AM
Copy a formula maintaining a constant cell Tiana Excel Worksheet Functions 3 July 26th 05 07:27 PM


All times are GMT +1. The time now is 03:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"