devdude19289
devdude19289

Reputation: 153

IF STATEMENT GOOGLE SHEETS

I have this conditional statement:

=IF(AD6=0,0,AG6)

what I am trying to do is check if AD6 is equal to 0, then set AG6 = 0 as well. however, that doesn't seem to be working with this formula. Nothing changes.

I also tried:

=IF(AD6=0,AG6=0)
=IF(AD6=0,0,AG6=0)

below is an image on what I currently have in the spreadsheet: enter image description here

basically, AD6 is the left column, and then column on the far right is AG6. basically, as you can see, if AD6 is equal to 0, I want to set AG6 = 0 too.

what can I do to fix this?

Upvotes: 0

Views: 65

Answers (2)

player0
player0

Reputation: 1

check your formatting. try:

=IF(AD6="0"; 0; AG6)

Upvotes: 1

Martín
Martín

Reputation: 10084

Briefly, you can't change the value of another cell with a formula. For example, you wouldn't be able to put a formula in AI6 that changes the value of AG6. If you have values inserted in AD6 and AG6 you can return a value in another column that reflects this condition. For example: =IF(AD6=0,0,AG6) - then, you would refer to that cell for your further calculations and not AG6

Upvotes: 0

Related Questions