• ## Help Me Figure Out a Formula?

Author
Topic
#2607952

Hi there,

I need help creating a formula for a Google Sheet.

Column E will be either be “D’ or “J”.

If Column E is “D”, then Column F should automatically render as C[Row Number]/2 and Column G should automatically render as 0.

If Column E is “J”, then Column F should automatically render as 0 and Column G should automatically render as C[Row Number]/2.

Can anyone help me figure out the formulas?

Thanks so much!

Author
Replies
• #2607956

In Excel  or google sheets you would use =if(this equals your first argument, then do that, else do something else)

How to Use the Google Sheets IF Function (howtogeek.com)

• #2607958

Thanks. Yep, I need to use “if-then” logic. Any chance you help me with the specific code? I can’t figure it out, even after consulting the link you kindly provided. Thanks again.

• #2608079

In F1: `=if(E1="D",C1/2,0)`
In G1: `=if(E1="D",0,C1/2)`

I have assumed E is never blank. If it is:
In F1: `=if(E1="D",C1/2,if(E1="J",0,""))`
In G1: `=if(E1="D",0,if(E1="J",C1/2,""))`

cheers, Paul

###### 1 user thanked author for this post.
• #2608227

Thanks, Paul. This is super, super helpful!

E is never blank; it will either be “D” or “J.”

All the best,
J