Set a value in multiple cells based on a condition
I am trying to set a value in several cells when a single condition is true.
For example, if A1 = B1, then I want to set all cells C3, D3, E3 and so on to a given value. For instance, when IF(OR(A1<0, B1<0) ... ), I want to set a bunch of cells to zero. (I realize I can put an IF in each of the target cells, but this seems there should be an easier way.) Many thanks for your help. |
Set a value in multiple cells based on a condition
You could use a change_event macro to do as desired.
If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear explanation of what you want 4. You send before/after examples and expected results. -- Don Guillett Microsoft MVP Excel SalesAid Software "Hickory" wrote in message ... I am trying to set a value in several cells when a single condition is true. For example, if A1 = B1, then I want to set all cells C3, D3, E3 and so on to a given value. For instance, when IF(OR(A1<0, B1<0) ... ), I want to set a bunch of cells to zero. (I realize I can put an IF in each of the target cells, but this seems there should be an easier way.) Many thanks for your help. |
Set a value in multiple cells based on a condition
I should have noted that I am using Excel 2003.
"Hickory" wrote: I am trying to set a value in several cells when a single condition is true. For example, if A1 = B1, then I want to set all cells C3, D3, E3 and so on to a given value. For instance, when IF(OR(A1<0, B1<0) ... ), I want to set a bunch of cells to zero. (I realize I can put an IF in each of the target cells, but this seems there should be an easier way.) Many thanks for your help. |
All times are GMT +1. The time now is 02:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com