0

I'm a super novice, trying to navigate data analysis in Excel, so be kind! I need to combine the IF and RIGHT functions.

So it's a sales dataset with different products, I need to use the IF function to filter the products so it only applies to "Bikes". Then I need the last 2 characters of the Product Name column which represents the size of the bike.

I've got the RIGHT function to work by itself but I can't combine it with the IF function so it only applies to the bike products.

=RIGHT(L2,2)

If this makes sense to anyone please help!

sgregory
  • 1
  • 1
  • 1
  • 2
  • Please provide some test data and expected output in the original post using [edit] – Scott Craner Nov 22 '17 at 15:54
  • Check [https://www.mrexcel.com/forum/excel-questions/543042-if-right-formula.html](https://www.mrexcel.com/forum/excel-questions/543042-if-right-formula.html) – alseether Nov 22 '17 at 15:58

3 Answers3

1
=IF(LEFT(A1, 5) = "Bikes", RIGHT(A1, 2), "")

Then just copy this down the range of your data.

1

Here's how you do it when working within a table:

=IF([Product Category]="Bikes",RIGHT([Product],2))
dferenc
  • 7,918
  • 12
  • 41
  • 49
John
  • 11
  • 1
0

Try this. It worked for me.

=IF([@[Product Category]]="Bikes", RIGHT([@Product],2),"")
mechnicov
  • 12,025
  • 4
  • 33
  • 56