Excel - Cell Values at Interval - excel

I have the following scenario:
If cell I2 has a value, I want cell I3 to be equal to D3 and continue until 2 years (=C3), then next 2 years (=E3-C3) as $1 (=F3), then next 2 years (=G3-E3) as $3 (=H3).
I want the following as shown below in I3 to T3. How to do this in excel?
Thanks

I'm not quite sure I understand the purpose of triggering a reset of the phase costs so I won't include that in my answer until you review your question to properly explain it. Otherwise, see my answer below.
I would think a separate table is more concise for display values and lets you extend easier without adding columns.
I changed from year number (1-6) to year (2019-2024) since that's what you are displaying. I then used an INDEX MATCH but used the lookup argument of 1 to allow matching values greater than the year start.
EDIT
In order to do what you would like, I had to set a start and end range on the left side. Please recreate the formulas in your workbook.

Related

Excel VBA - customized SUMIF function [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
I have data like below. First column has combination of tags and numbers and second column has values
e.g.
First row: AB value is 10
Second row: Out of the value 20, AB is 10% & PQ is 90%
As these tags are custom defined for classification, the letter & numbers can be assumed to follow 2 characters each, except if the percentage is 100% there won't be any numbers after the letters (e.g. first row - AB)
If we segregate the tags and their values, it will be like below
I guess, an enhanced/customized SUMIF function is required to achieve this. Hope someone can give some ideas
What was tried so far:
I tried to do the steps in multiple steps, breaking down the tag into columns --> I was successful, but could not figure out how I can multiply the factor and get a summation. This way of doing it makes it hard to port the formula to other worksheets. Need to create additional columns etc. Hence abandon that plan
Thought of creating a VBA script to enhance the SUMIF function. Buy doing this I can copy the VBA code to other sheets and use my custom function. If needed the function can be enhanced further. To get some ideas on this plan, I posted this question
Thanks
I'm going to do this in two steps to make it easier to understand. First step: separate out the percentage factor by each keyword. Set up a table to the right of your data.
In the first row are all the codes you want to create sums for. Underneath it are the various desired percentages for each of your data rows. We're going to look for what's in row 1 inside what's in column A. If we don't find it then the element percentage is zero, if we find it but there's no number after, then the percentage is 100, otherwise use the 2 digit number that follows. Here's the formula in E2:
=IF(ISERROR(FIND(E$1,$A2)),0,IFERROR(VALUE(MID($A2,FIND(E$1,$A2)+LEN(E$1),2)),100))
The first part says if you don't find E$1 inside $A2 use a zero factor. The rest says to pick up the two digit number after the point you found E$1, but if it fails, use 100.
After copying the formula into all the cells, you can see the above factors. The rest is pretty easy. Incorporate the above formula into a sum range, multiplying by the value in column B and dividing by 100.
={SUM(IF(ISERROR(FIND(E$1,$A3:$A7)),0,IFERROR(VALUE(MID($A3:$A7,FIND(E$1,$A3:$A7)+LEN(E$1),2)),100))*$B3:$B7/100)}
Don't forget to terminate this array formula with Ctrl-Shift-Enter. I got the following results:

Generate words based on cell values [duplicate]

This question already has answers here:
Formula to generate a value according to a range
(2 answers)
Closed 4 years ago.
[enter image description here][1]I haven't used Excel since high school (2004-2005) but I was pretty proficient in writing formulas back then based on static and dynamic cell values. I'm currently trying to make a spreadsheet that can keep up with statistical data based on yes and no inputs (or 1 and 0 if you prefer binary).
In a game, I am managing a business and want to be able to keep track of employees based on their success. Success is a yes/no value. I'd like to have a table on sheet 2 that has the entire success/failure history of the player and on sheet 1 have a brief overview of their history that's listed on sheet 2 (overall success rate, success rate of last 10 inputs, and success rate of last 5 inputs).
I may or may not be able to figure out the formulas for those. If not, I'll be sure to research before asking for help on that. What I can't figure out is how to assign a word value for a given success rate. For example, I'd like J7 to give a value of "Trusted", "Dependable", "Endorsed", or "Warning" based on the value in K7. If the value of K7 is 90%-100% J7 should populated "Trusted". If the value of K7 is 80%-89% J7 should populate "Dependable". If the value of K7 is 70%-79% J7 should populate "Endorsed". If lower than 70% J7 should populate "Warning".
I'm trying to make the spreadsheet easy to use so that when I expand in the game I am able to share the spreadsheet with new branch owners to keep track of players working under them. That's why I would like the spreadsheet to be easy to manage so it doesn't take them long to figure it out and it doesn't take a long time to manage the spreadsheet so it doesn't rob them of game time.
Thanks in advance :)
This can be done using the lookup function as noted by Jeeped or simply using the IF function. Try using the following in you J column next to the first row of data and populate all the way to where the row where your data in K column goes:
= IF(K1<0.7, "Warning", IF(
AND(K1>=0.7, K1<0.8), "Endorsed", IF(
AND(K1>=0.8, K1<0.9), "Dependable", "Trusted")))
Try this in K7,
=LOOKUP(J7, {0,0.7,0.8,0.9}, {"Warning","Endorsed","Dependable","Trusted"})

Need help on getting specific information from an excel formula

I work for a company that has multiple locations selling auto parts. I'm wanting to look at the 'freshness' of the inventory, but for a specific year range for specific vehicle(s).
The basic formula I'm using is
=COUNTIFS(INVENTORY!$A$2:$A$50000,$B$1,INVENTORY!$I$2:$I$50000,$J$117,INVENTORY!P$2:P$50000,$C$118)
Result is 4
The first argument is looking at the location, the second is looking at the particular vehicle. The third is determining whether the inventory is either 30, 60 or 90 days old, and I'm getting the right information. What I want to know now is, while looking at those 4 vehicles, how many of those are made between the years 2004 to 2010, so the criteria for the 4th argument has a range within it, not one specific year (I know the result should come back as 1 in either the 30, 60 or 60+ cell). On the inventory sheet, the years of the vehicles are in column 'E'. I'm not sure if I need to use imbedded IF statements to specify the year range, or need to rewrite the whole formula. Can anyone give me some advise on how to write the formula to get this info?
You can add two conditions to your COUTINFS on the same E column for the year, i.e.
=COUNTIFS(INVENTORY!A:A,$B$1,INVENTORY!I:I,$J$117,INVENTORY!P:P,$C$118,
INVENTORY!E:E, ">=2004", INVENTORY!E:E, "<=2010")
The second line above shows the additional consitions. If the range of years is dynamically present in cells, say C1 and D1, the criteria should be composed by concatenation, i.e.
=COUNTIFS(INVENTORY!A:A,$B$1,INVENTORY!I:I,$J$117,INVENTORY!P:P,$C$118,
INVENTORY!E:E, ">="&C1, INVENTORY!E:E, "<="&D1)
' ^^^^^^ ^^^^^^

Totals in excel without including certain cells

This might be a bit difficult to explain, but below is the spreadsheet im using, for the totals highlighted in blue i want to create a formula that shows the difference between the two years but only up to the previous month. For example as we are currently in July, i want to show the difference in the two years from May-June.
Currently i am using the formula;
=SUM(K4:K5)-SUM(F4:F5)
Which works, but it means i will have to update it every time i add information in for the new months. Is there a formula i can use thats not overly complicated to get the same result, but it will update automatically when i add new information in.
You can use the =SUMIF() formula.
It will only perform the sum operation if certain conditions are met, so we can set it up to sum all entries in a certain range that are not empty.
Here is a good explanation of the function.
https://exceljet.net/formula/sum-if-not-blank
So for your case, you would write (in the sum cell)
=SUMIF(K4:K15,"<>",K4:K15) - SUMIF(K4:K15,"<>",F4:F15)

How to create a table (in excel file) with elements that represent fixed size intervals [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want help to create same kind of file with a table whose elements are intervals with a fixed size of 10. The intervals should start at 15001 and end with 20000. I have attached a sample image of the excel sheet below. Please help me and tell me a method of creating such file which involves minimum typing.
Please help me.
I have also attached a image table for reference
There are a couple of ways to do this. The simplest is to enter your starting number in cell A1. Then in Cell A2 enter
=($A$1+(ROW()-ROW($A$2))*10+(COLUMN()-COLUMN($A$2))*650)&" to "&($A$1+(ROW()-ROW($A$2))*10+(COLUMN()-COLUMN($A$2))*650)+9
Copy that down till is has the number you want shown, and then copy all the formulas from the A column to the right.
Size and format your cells to suit your needs.
IF you do not want to put 1501 in cell $A$1 then in the formula replace $A$1 with 1501.
$A$2 will need to be adjusted to the cell you are using for your top left corner.
Explination
=($A$1+(ROW()-ROW($A$2))*10+(COLUMN()-COLUMN($A$2))*650)
This part of the formula determines the first number. you will notice you see it repeated exactly twice. At the end of the second repetition +9 was added to it to get the second number.
($A$1+(ROW()-ROW($A$2))*10+(COLUMN()-COLUMN($A$2))*650)+9
Once you have the two numbers figured out we glue them together so to speak by place a little concatenation sequence in between:
&" to "&
The important part here was to leave a space on either side of the word "to" so that when the numbers were place on either side there would be a space as well.
So how did that ugly formula work out to be a number? Well first we needed a starting point which was the Value in $A$1. In this case also 1501. Then we look at the pattern for the first number going down. Every row it increases by 10. So that means 1501+(each row)*10. So we need a way to count each row. I chose to do this with:
row()-row($A$2)
Row() without an address in it tell you the number of the row you are currently in. $A$2 is the address of the top left corner of the table. So if that formula were in the top left corner it would return a value of 2-2 = 0, and for the next row down it would be 3-2 = 1. So now we have a nice little counter going down and that is how we wound up with:
=$A$1+(ROW()-ROW($A$2))*10
Now we need to take care of the portion of how to increase the first number as we go across the columns. Looking at the pattern it increase 650 for each column. So similar to are ROW() function there is a COLUMN() function. We apply the same concepts that we did for the row calculation and add it to the formula we already have:
=$A$1+(ROW()-ROW($A$2))*10+(COLUMN()-COLUMN($A$2)*650
now technically speaking if you are doing this with A1 being your top left corner you can simplify the equation, and hardcode in the initial number and calculate your starting numbers with:
=1501+(ROW()-1)*10+(COLUMN()-1)*650

Resources