Hello, I'm trying to track changes made in an excel spreadsheet. I have several formulas in the spreadsheet which I don't want to protect because the individual user may need to remove the formula and modify the cell contents manually. I'd like to be able to highlight the cell if the user deletes the formula and manually enters a value so it is easier for management review. I tried working with the conditional formatting but I can't find a way to create a rule for it. I'm thinking it may require some kind of macro but I'm really not proficient in macros. Any help would be greatly appreciated.

Thanks.

Hi, How about an approach that allows users to replace a calculated value with a user-entered value

withoutremoving the formula.Try this:

In cell E1 enter 2

In cell E2 enter 4In cell E3 is your formula: =E1*E2 - your formula calculated value is 8).

Use cell D3 for the user entered data.

(You can add highlighting etc. to D3 to identify it as a user-permitted cell)

Now replace the formula in E3 with this:

=If(D3="",E1*E2,D3)

Add conditional formatting to cell E3

Use the Formula Is: option and this formula:

=IF(D3<>"",TRUE,FALSE)

Note that TRUE and FALSE are not in double quotes - they are the Excel logical values true and false.

Select a Red format for the cell and hit OK.Now if a user wants to enter a value to replace a formula calculated value they can do so.

The formula is not lost

and the fact that a User-entered value has been used is clearly visible.Leaving cell D3 empty and you get 8 in E3

Enter 10 in cell D3 and you get 10 in E3 and its flagged in Red.Regards

Thanks for the input. Unfortunately it's really not the best solution for my project. The spreadsheet needs to be able to "grow" and the end users of the spreadsheet are not proficient in excel enough to update it as needed. I really was looking for some type of conditional format formula that I could blanket over the entire worksheet but I think I may have to add a "personalized" conditional format in each cell that would say to highlight the cell if it does not equal the results of the formula. Not sure if it will work the way I need it to but I think that is my best bet. If you have any other suggestions I'm always open for them.

Thanks again!

Actually, I think what I may need is an if statement that would allow me to indicate if a formula is used or a constant numeric value. I could put it into a hidden column next to the data I need to test and add conditional formatting to the column that is showing to say that if the hidden cell indicates that there is a constant value then highlight the cell that is showing. I just don't know how to do a formula that looks for a formula. Cell(type) does not do what I need it to do. Any ideas?

I have never used it, but there is a Track Changesfunction built into Excel:On the Task Bar/ Ribbon

Review Tab

On the far right side,Track ChangesLook here for pointers on it's use:

http://www.ozgrid.com/Excel/track-c...

MIKE

Hi, If you really want to go the route you are proposing - it seems unduly complicated and just as problematic from a 'growing' point of view - you could use the following user defined formula which will return TRUE or FALSE depending on whether the cell referenced contains a formula:

Enter this in a standard VBA module:

Public Function ISFORMULA(TestCell As Range) If TestCell.HasFormula = True Then ISFORMULA = True Else ISFORMULA = False End If End FunctionUse this:

=isformula(B8)in any cell.

In this example if B8 contains a formula, the cell will return the logical value true, which can then be used in a conditional format.Apply this 'Formula Is:' conditional format to cell B8:

=C8=FALSE

If there is a value rather than a formula in B8, the conditional format will be applied (assuming C8 contains the user defined function).Regards

Thanks for the help. I wound up going with something that is very complicated and will likely need to be updated if it is larger than I have allowed for but I have not worked with VB in a long, long time and have no idea how to do anything in 2007 with it so I opted out for now and will try to get into a class to learn it because I know it really will make my life easier. Thanks again.

Hi, You don't need to understand a lot about VBA to use a pre-written user defined function (UDF).

Here is a step-by-step guide for Excel 2007:

As it sounds like you are distributing the workbook, you will need the UDF to stay with the workbook.

Save the workbook in a macro-enabled format. *.xlsm

Right-click the name tab at the bottom of the worksheet and select 'View Code'

This opens the Visual Basic window, with your worksheet name selected in the Project Explorer pane.

Right-click the worksheet name and select 'Insert' and 'Module' (not Class Module).

In the large visual basic window (the one with two drop-downs at the top), paste in this code.Public Function ISFORMULA(TestCell As Range) If TestCell.HasFormula = True Then ISFORMULA = True Else ISFORMULA = False End If End FunctionClick Save from the VB menu bar

Now use Alt + f11 (the Alt key and function key #11 together) to return to the main Excel window.

In an empty cell enter a formula like this:

=IsFormula(A1)

The cell will return True or False as described in my previous post.Regards

Humar

Ask Your Question

Weekly Poll

Do you think ride and car sharing are the future of transportation?

Discuss in The Lounge

Poll History