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!
=IF(LEFT(A1, 5) = "Bikes", RIGHT(A1, 2), "")
Then just copy this down the range of your data.
Here's how you do it when working within a table:
=IF([Product Category]="Bikes",RIGHT([Product],2))
Try this. It worked for me.
=IF([#[Product Category]]="Bikes", RIGHT([#Product],2),"")
Related
Hello everyone and thanks a lot in advance for any help.
I'm not very good using Excel. I want to know if there is a simple way in which I can sort a small two-column data matrix following the order of a column that contains all the bird species in Colombia. I study birds and I usually do avifauna characterization studies. I've always had this problem of not being able to order efficiently using the taxonomic order of species. I have always done it by hand and it takes me a really long time.
This is the file with the example that ilustrates my problem: https://docs.google.com/spreadsheets/d/1089VD4ylJiW9Xw9xRFI0ehraAc_t-qSa/edit?usp=sharing&ouid=112790797352647984659&rtpof=true&sd=true
There are two worksheets in this file. One called "Species" and the other "Data". I need to know if it is possible to make Data array can be sorted following the Species column.
I have tried creating custom lists and the number of entries to create a certain order does not allow me to put more than 100. I have also tried using commands Sort and Sortby without any success.
Again, thanks a lot for any help.
Regrets.
On the Data worksheet, add a helper column:
C2: =MATCH(A2,Species!$A$1:$A$2000,0)
and fill down.
Then Sort by the helper column
Since I've exhausted about every resource I could find in regards to this question, I figured it was finally time to ask this community.
I have a very large (15k+ row) dataset that I'm looking to generate a report on giving the top 25 largest values based on one of the columns, HOWEVER, there is additional criteria that needs to be considered other than just the values in one column. I have done this already with less criteria, but adding more is giving me trouble.
My (working) formula for Top N with some criteria:
{=LARGE(IF('IMPORTED DATA'!$X$4:$X$1048576 = IF('Data Cleanup'!$AX$3 = 1, "Gaming Designed", "Not Gaming Designed"), 'IMPORTED DATA'!$BH$4:$BH$1048576), ROW(A2) - ROW(A$1))}
The issue comes when I have another criteria I need to add that uses wildcard characters to distinguish the 'correct' criteria. Here is what I've come up with so far, but this just results in the COUNTIF portion always resulting in true, so not actually applying the added criteria:
{=LARGE(IF(COUNTIF('IMPORTED DATA'!$P$6:$P$1048576, IF('Data Cleanup'!$AX$3 = 1, "?????", "????")) * ('IMPORTED DATA'!$X$6:$X$1048576 = IF('Data Cleanup'!$AX$3 = 1, "Gaming Designed", "Not Gaming Designed")) * ('IMPORTED DATA'!$E$6:$E$1048576 <> "All Other (Suppressed)"), 'IMPORTED DATA'!$BH$6:$BH$1048576), ROW(A2) - ROW(A$1))}
I tried to work-around IF statements not accepting wildcard characters using the COUNTIF method but to no avail.
I understand that this is a bit of a rough question, but I'll do my best to respond to as many questions as I can to help clarify.
A couple more bits of information that may be helpful:
This is entirely based in Excel 2019, I know that FILTER would be an easy solution, but I don't have access to that in this version of excel.
The reason for using wildcards is because it was the easiest way to distinguish between the two categories to sort: above or below 100Hz. Anything under 100Hz will be 4 characters, while anything above will be 5.
I also need other data from the same row as the results, so any methods must be also applicable to MATCH criteria so that I can look up the rest of the data with the same search parameters.
its very hard to understand without seeing the data.
What i understood is that if you make a helper column in the dataset as per the criteria you want that would solve your problem.
at least thats how i am also using.
You need to create a ranking column in the data sheet.
Ranking Formula = =COUNTIFS($M$3:$M$233,">="&M3,$K$3:$K$233,K3)
with thise formula you can add as many as criteria as you want.
Index Formula = =INDEX($K$3:$K$233,MATCH(1,($K$3:$K$233=$B$1)*($N$3:$N$233=A3),0))
you need to change the columns names you want.
no need row() functions just try always to use simple sequence will work
Good luck
Ended up solving this in a very simple method thanks to Scott Craner's comment.
Since wildcards don't work in if statements, using LEN did the trick. Final formula ended up being:
{=LARGE(IF(LEN('IMPORTED DATA'!$P$6:$P$30000)=IF('Data Cleanup'!$AX$3 =1,5,4) * ('IMPORTED DATA'!$X$6:$X$30000 = IF('Data Cleanup'!$AX$3 = 1, "Gaming Designed", "Not Gaming Designed")) * ('IMPORTED DATA'!$E$6:$E$30000 <> "All Other (Suppressed)"), 'IMPORTED DATA'!$BH$6:$BH$30000), ROW(A2) - ROW(A$1))}
Thank you to everyone for your help!
I'm trying to create a pricing matrix for products but using Index/Match or SumProduct formulas are proving to be a nightmare for me, I'm wondering if VBA would be easier?
Essentially if a product width or height is in between two figures, I need the price quoted to take on the next pricing bracket. (NB: Rounding up or using Ceiling functions within the formula doesn't work for me either)
Examples of the code I've tried using are:
=SUMPRODUCT(--(HeightRange=CEILING(Height,1000))*--(WidthRange=CEILING(Width,10))*PriceRange)
=INDEX(PriceRange,MATCH(MIN(ABS(HeightRange-Height)),ABS(HeightRange-Height),-1),MATCH(MIN(ABS(WidthRange-Width)),ABS(WidthRange-Width),-1))
Example Table:
Use:
=INDEX(B:J,MATCH(N3,A:A),MATCH(M3,B$3:J$3))
You could make use of =AGGREGATE() like so:
=INDEX(A:E,AGGREGATE(15,3,(($A$4:$A$11>=N3)/($A$4:$A$11>=N3))*ROW($A$4:$A$11),1),AGGREGATE(15,3,(($B$3:$J$3>=M3)/($B$3:$J$3>=M3))*COLUMN($B$3:$J$3),1))
You can use directly formulas just like both guys said above...
Mine here:
=INDEX($A:$J,MATCH($N3,$A:$A,0),MATCH($M3,B$3:J$3,0))
Good afternoon, I'm stuck with a small problem of formulas in excel:
I have a table in another sheet and I have to perform the following operations:
1. number of units sold in Bogota.
2. number of units sold in different cities to Bogota.
I'm trying to use the formula:
=SUMIF(DATOS!$G$4:$G$146;"BOGOTA";DATOS!$H$4:$H$146)
For the first requirement works, but at the moment of using it to know which city is different from Bogota, I do not know how to do it; try to use the <> operator but I get an error and placing the formula as follows:
=SUMIF(DATOS!$G$4:$G$146;NOT("BOGOTA");DATOS!$H$4:$H$146)
do not add the data (Summation gives 0). Someone has an idea of the problem.
I believe you have to put quotes "like this" around the entire logical statement ""<>BOGOTA"
It can be used like this:
=SUMIF(DATOS!$G$4:$G$146;"<>BOGOTA")
Hope this helps
I have an Excel report where I have to convert money (Column O in the picture) into EUR currency:
So far I have been using the IF function, but here the pattern is a bit different. Instead of
=IF(Condition;"true";"false")
I need rather
=IF(P2='EUR';O2);IF(P2='USD';O2*0,78);IF(P2='GBP';O2*1,25);
Just it does not work as it's not a correct Excel expression.
Any help ?
Something like this...
=IF(P2='EUR';O2;IF(P2='USD';O2*0,78;IF(P2='GBP';O2*1,25;NA())))
You'll have to nest the IF function calls, i.e.
IF(Condition1;Result1;IF(Condition2;Result2;If(Condition3;Result3;SomeDefault)))
Example here:
First arrange a currency values table versus euro for example I did that in sheet 2 on below image
then you can use the formula:
=IF(ISNA(VLOOKUP(P2,Sheet2!$A$1:$B$4,2,0)*O2),"Incorrect urrency",VLOOKUP(P2,Sheet2!$A$1:$B$4,2,0)*O2)
Right. I don't have excel, but I did it on Google Spreadsheets, and it works.
So what you have to do is to nest the conditions, such as:
=IF(B1="EUR";A1;IF(B1="GBP";A1*1,25;A2*0,78))
So you will get something like:
Hope this helps!