Forum Discussion
Tanguy Frippiat
Sep 25, 2018Copper Contributor
Subtract specific amount to multiple cell if condition met
Hi,
I have a list of numbers in a column (let’s say B1 to B10) and I want to apply a correction to all of them if a condition is met. E.G: If A2 is Yes, I want to apply a -3 correction to my numbers in column B. If A2 is No, no correction.
Sounds pretty easy to do by creating a formula in the C column, but the thing is I want that to happen in those same B1 to B10 cells. I could do something like =IF(A2=“Yes”, SUM(5-3), 5) but the idea is to not have to retype the formula for all the cells (I have way more than 10 cells in my actual file).
So, do you think it’s possible without creating another column?
I have a list of numbers in a column (let’s say B1 to B10) and I want to apply a correction to all of them if a condition is met. E.G: If A2 is Yes, I want to apply a -3 correction to my numbers in column B. If A2 is No, no correction.
Sounds pretty easy to do by creating a formula in the C column, but the thing is I want that to happen in those same B1 to B10 cells. I could do something like =IF(A2=“Yes”, SUM(5-3), 5) but the idea is to not have to retype the formula for all the cells (I have way more than 10 cells in my actual file).
So, do you think it’s possible without creating another column?
5 Replies
- Lorenzo KimBronze Contributor
a simpler way is by VBA.
pls see attached file.
hope that you can work something out of it.
thanks..
- Tanguy FrippiatCopper ContributorOh, i’ll Try that! Thank you!
- Lorenzo KimBronze Contributoryour feedback will be appreciated..