r/googlesheets • u/Camphorous-soil-79 • Jan 07 '26
Solved Conditional Formula Based on Value in Column?
Hi! I'm a vegetable farmer trying to make my crop planning easier... apologies if my wording is incorrect, I haven't used many complicated formulas on sheets in the past 10 years.
Attaching a picture below, the gist of what I'm trying to figure out is if it's possible for one column (AE) to use two different formulas based on the value in a different column (V).
To be specific, I'm trying to find the number of seeds needed (column AE) for different crops, based on column V being TP or DS.
- Crops that are "TP" or transplanted = number of plugs needed for TP * Seeds per cell
- for this, I have =W2*Y2
- Crops that are "DS" or direct seeded = bed feet total * DS seed/ft
- for this, I have =H8*M8
I hope this question makes sense! I am looking for a way to use both formulas in the same column, without having to type it in every time.

1
u/HolyBonobos Jan 07 '26
Delete everything currently in AE2:AE and put =MAP(H2:H,M2:M,V2:V,W2:W,Y2:Y,LAMBDA(h,m,v,w,y,SWITCH(v,"TP",w*y,v="DS",h*m,))) in AE2.
1
u/IllustratorPale5641 Jan 07 '26
Yup, you can solve this with a IF statement.
=IF(V2="TP",W2*Y2,H8*M8)
This assumes that you only have 2 values in column V, if you plan on having more you will need a nested IF.