Using conditional statements in Google Sheets

I’m transitioning from Excel to Google Sheets, and I’m having a hard time adapting a formula. In Excel, I used a conditional formula that worked just fine, but it seems to behave differently in Google Sheets.

What I want to achieve is to check if a specific cell indicates a payment type, and if it does, I want to compute a total that adds the base amount and a percentage charge. If it doesn’t match, I’ll just keep the base amount.

=IF(C2="stripe",((C5*D5)+C5),C5)

   C         D
1
2  STRIPE
3  75        3%

Could someone guide me on how to correct this in Google Sheets? I realize there are some syntax variations between the two, but I’m unsure about my mistake.

The formula looks right for Google Sheets, but I bet it’s a cell reference or formatting issue. I’ve hit this same problem moving from Excel to Sheets - usually the percentage in D5 isn’t being read correctly. Try switching that 3% to 0.03, or double-check the cell’s actually formatted as a percentage. Also watch out for case sensitivity - “STRIPE” vs “stripe” won’t match. You could use =IF(UPPER(C2)="STRIPE",((C5*D5)+C5),C5) to fix that. And check for extra spaces in C2 that might break the exact match.

Your formula syntax looks right for Google Sheets. I’ve hit this same issue when moving spreadsheets around. The problem’s probably your cell references - you’re pointing to D5 but your percentage looks like it’s in D3. Try =IF(C2="stripe",((C3*D3)+C3),C3) instead. Google Sheets can be pickier about data types too. Make sure D3 is formatted as a number (either 0.03 or 3%). Click on D3 and check the formula bar - if it shows 0.03, you’re good. If it shows “3%” as text, that’s your problem.

ur formula looks good to me. I think u might have the wrong cell reference tho - shouldn’t it be D3 instead of D5 for the percentage? ur data shows 3% in row 3. Also, Google Sheets gets weird with text comparisons sometimes. Try wrapping C2 in TRIM() to catch any hidden spaces that might be breaking it.