Hi All,
The formulas in certain column, e.g. in c1 "=b1-a1", is replaced with the result.
I assume it is caused by a setting somewhere that I am unaware of.
Your assistance would be much appreciated.
Zagrijs
Hi All,
The formulas in certain column, e.g. in c1 "=b1-a1", is replaced with the result.
I assume it is caused by a setting somewhere that I am unaware of.
Your assistance would be much appreciated.
Zagrijs
The only setting I know that affects that area is under Options
Are you sure that you or a macro did not do a PasteValues to those cells?
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
Just in case: this will also happen if you use a formula in a table header, or if you have a userform control whose controlsource is linked to the cell.
Be as you wish to seem
Thanks Aflatoon.
It is not linked to a table header or use form control, not that I am aware of.
I have a destination workbook into which the information from source workbooks have to be imported.
In the sub I used >> worksheet.range(a,z).value = worksheet.range(a,z).value <<
The specific column had the formula to calculate the difference between two dates in the source workbook. Obviously only the value, and not the formula, was copied to the destination workbook. When I try to change the value ion the destination workbook to a formula again, it immediately reverts back to the value.
I tried to create the formula in another cell that is unaffected and copied it to a cell in the affected column. So far so good! But when I try to copy that cell's contents, the formula, to the other cells in the column, the source cell immediately reverts back to the value.
I have never come across this and it leaves me baffled.
It would seem that something was changed in the destination workbook when the values were transferred from the source workbooks and I don't have an idea what changed and how to correct is
Regards
It sounds as though there is a Worksheet_Change event (probably in the destination workbook) which is converting the formula back to a value. Right-click the worksheet tab, choose 'View Code' and then see if there is any code shown.
Be as you wish to seem
Top right under [Thread Tools] -- you (as the originator) get an extra button on your post to mark it solved
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
Thanks! Done!