I have a pretty large data set I with adresses and postal codes, and I need to organize said data set by postal codes only, which resulted in a large number of variables.
The code goes like this (it continues for a long while, but in order to shorten it for easier access and reading:
=IF(ISNUMBER(SEARCH("NEPAL";F2));RIGHT(F2;5);IF(ISNUMBER(SEARCH("MALTA";F2));RIGHT(F2;5);IF(ISNUMBER(SEARCH("SWITZERLAND";F2));RIGHT(F2;5);IF(ISNUMBER(SEARCH("CHINA";F2));RIGHT(F2;5);IF(ISNUMBER(SEARCH("CHILE";F2));RIGHT(F2;5);"OTHER"))))))
I had to translate the formula since I'm using EXCEL in Portuguese.
TL'DR: My formula hit the character limit (it's a lot bigger than what's above) and I still have some variables I need to add to the formula (eg.):
IF(ISNUMBER(SEARCH("ANGOLA";F2));RIGHT(F2;6)
and other variables with the same functions.
If anyone could help me shorten the string, I would appreciate it!
Used the solution sugested by #Rory and it worked perfectly for what I wanted! Thank you all!
[as per the comments, I am happy to provide a minimal example of the problem if someone can tell me how to upload excel to stack overflow!]
I had a look at previous answers, but nothing seems to fit. Once answer nearly did, but I can't adapt it. Trying to steer clear of VBA but please tell me if needs must.
Basically, I have a large-ish sheet of incident tickets. Some are logged by company A, and some by company B. Unfortunately, the only way to tell which company has logged which ticket is to search in another table on name. What I am trying to do is count tickets that match certain criteria that were logged by, let's say, company B - I have the list of people at company B in a worksheet in the workbook
Obviously, COUNTIFS seems to be the obvious answer, except I can't seem to get a sensible answer from COUNTIFS. :) So, I can get a perfect number of tickets for this or that criterion, but I am unable to add that the ticket should be from company B only, ie: I need a COUNTIFS('Ticket'!$D:$D,'CoBPeople'!$N:$N) term, and I don't see how that's possible to include. In VB, I would know which thing I am iterating over and check each time (inefficient, I know, but we're talking thousands here, not millions!) and just add them up, but it doesn't seem to be possible to get COUNTIFS to "lookup" each name it finds as it does its thing.
Any ideas? I just feels like there is an obvious answer I am missing...
Thanks in advance!
MrBB.
I was hoping to be able to do tis without modifying the ticket dump, but adding a column that checks which company a person works for does look like that's the easiest solution.
I feel like I'm missing something here but can't find out what. I'm creating a planning template. I want a separate table in which the user can put the deadline name with the deadline week.
In my planning overview I want these deadlines to appear. To do this, I tried an approach with IF()-statements. Although this works well, it doesn't deal with a new deadline that is added later on in the project.
I could brute force this and create 30 IF()-statements so there's space for 30 deadlines (which is more than enough) but I have a feeling this can be done in a much smoother way. Do you have any suggestions for this?
You can use INDEX/MATCH:
=IFERROR(INDEX($A:$A;MATCH(E2;$B:$B;0));"")
looks like you have not used the function vlookup before.
Vlookup is one of essential functions in excel and learning & starting use of it will definitely make you a better excel user and save you lots of time later on.
You can solve your puzzle via vlookup as described below:
Swap the columns "name" & "week". Week will be in col A, Concept in col B.
Write this formula to cell E1 and then you can paste it to F1 to N1:
=IFERROR(VLOOKUP(E$2;$A$2:$B$50;2;FALSE);"")
I have been continually adding in complexity to my formulas to accomodate the large amount of data. I have been trying to simplify this excel formula but cannot seem to find a way that works well. I would appreciate any advice!
{=IFERROR(IF(INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),4)="Complete",INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2),IF(VLOOKUP([#SN],FullSNList_2,8,FALSE)="None",IF(ISNUMBER(MATCH(SUBSTITUTE(TRIM(M4),"`",""),TRIM($L4:L4),0)),INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&"` ",INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&" "),IF(OR(VLOOKUP([#SN],FullSNList_2,8,FALSE)="Dev",VLOOKUP([#SN],FullSNList_2,8,FALSE)="ECO",VLOOKUP([#SN],FullSNList_2,8,FALSE)="Rework"),IF(ISNUMBER(MATCH(SUBSTITUTE(TRIM(M4),"`",""),TRIM($L4:L4),0)),INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&"` ",INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&" "),IF(ISNUMBER(MATCH(SUBSTITUTE(TRIM(M4),"`",""),TRIM($L4:L4),0)),INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&"` ",INDEX(FullFlow_2,SMALL(IF(FullFlow_2[SN]=[#SN],ROW(FullFlow_2[SN])-ROW(INDEX(FullFlow_2[SN],1,1))+1),COLUMN(M$2)-COLUMN($L$2)),2)&" ")))),"_")}
A little more info on the code. It is meant to scan a table and search for a step name (DOC###). Depending on other criteria's (if one column has none, rework, or broke, in it) spaces are added to the end to differentiate between them while being able to still be counted at a later step. Also, if a step is being done for the 2nd time, a period will be added afterwards.
I have been putting the formula in http://excelformulabeautifier.com/ to help read it a bit easier!
UPDATE: I have Modified the formula a bit and added explanations. The new code has replaced the old one in the body. I have attached pictures to show my explanation.
Formula Explanation PG 1
Formula Explanation PG 2
Example Data output
NOTES: In order for this to work for me, due to the circular references, I turned on Iterative Calculations and set the Max iterations to 2.
Removing the VLookups from the formula made the calculation time a lot shorter! Thank you all for your ideas! Any other suggestions are greatly appreciated!
I've currently got a Uni project underway and part of this project is an excel spreadsheet which involves inputting data (to be later to be outputted).
Anyway, I don't have too much experience with Excel or programming at all, and I've come across a situation where I need some help.
The project involves building a climbing frame, using EITHER the material Wood, Steel or Aluminium.
In the input table, I have added a "Material Quantity" row where a user can select the material they would like to use (from the above list), and then the amount of material they want to use.
The problem is that the materials Steel and Aluminium can ONLY be provided in increments of 6 metres, while Wood can only be provided with an increment of 1 metre.
As you can guess, I want to create something where a user can select their chosen material and then ONLY be able to enter a amount with the same multiple of what it can be provided in. For example, if a user selects "Steel", they can only enter a value with a multiple of 6m - if they enter, for example, 10m, then I want it to return a error.
After some reading, I think the way to solve this problem is to use a nested IF statement with a MOD command too. If anyone can help me with the forumla it would be much appreciated.
The attached picture is what I've acheived so far (and an idea for you guys to see what I'm dealing with). I really have no clue how to approach the problem :(
Use this formula:
=OR(AND(E8="Wood",MOD(F8,1)=0),AND(OR(E8="Steel",E8="Aluminium"),MOD(F8,6)=0))
Another option would be to allow the user to input the exact length of material and then calculate the amount they will need using the 'MROUND' function.
=IF(OR(E8="steel",E8="aluminum"),MROUND(F8,6),IF(E8="wood",MROUND(F8,1),"Not valid"))