hardy
hardy

Reputation: 557

How we can do this in google sheet? multiply based on condition

I have data in google sheet and I want to get this

I have numbers value in B Column and want to multiply based on condition, Like if numbers above 650 in column B then formula insert value in Column C 125 if value bellow 650 in column B then formula multiply value with 0.16 like 648*0.16 and want final result in column C. If value above 850 in Column B then also formula multiply value with 0.16 like 855*0.16 and final result in Column C .

Here is ex:

enter image description here

Sorry for the bad English.

I tried this

=B2 * IF(B2 > 650,(0+125), IF(B2 < 649,0.16, IF(B2 < 850, 0.16, 0)))

but it does not insert 125 value as its X with 125 I don't want to multiply if value above 650 and bellow 850. so please help me with this.

Upvotes: 1

Views: 6480

Answers (2)

player0
player0

Reputation: 1

you can use arrayformula:

=ARRAYFORMULA(IF(B2:B<>"", IF((B2:B > 649)*(B2:B < 850), 125, B2:B* 0.16), ))

Upvotes: 2

JPV
JPV

Reputation: 27282

See if this works

=IF( AND (B2 > 649, B2 < 850), 125, B2* 0.16)

Upvotes: 1

Related Questions