Forum Discussion
VBA Code to Multiply a range of cells by a reference cell
Yes, this is the trouble I am having and why I was looking for code instead of a formula. My users need to be able to do nothing more than to enter a value in cell range (K8:K28) and what is displayed in the cell is the result of that value multiplied by K7. Does that help clarify what I am trying to do?
Thank you for your help.
Apparently there is a macro that can be used to do this. I have seen other forums with this request and they were successful. The only thing is that though the function is the same, the data differs from mine. I do not know enough about macros to be able to modify the lines to accommodate my sheet. If I figure this out, I will share with you so we can learn together.
Thanks for your time.
- mathetesJan 12, 2023Gold Contributor
I will be interested to see if that's possible.
However, as a person who spent years as director of a major database for a major corporation, I am very concerned about what DP/IT professionals call data integrity. This broad label can cover many things, but certainly includes saving accurate records of transactions, including transactions that lead to calculations. To take an example from another field, you would not want to enter a figure that shows a person's salary and have it immediately (in the same field) converted to their take-home pay, even though you've verified that the calculation process of deducting, say, taxes and benefits works as desired. You want to keep the original entry as part of the history.
It may be that in your application, that data integrity history doesn't matter, that it's more of an ephemeral thing of temporary meaning.
That, though, is the background reason for my resistance to your desire. Even if it can be accomplished, I don't think it's a good idea, a good practice, when it comes to designing a spreadsheet (or any other DP process). There are too many potential downstream unintended side effects.