excel skip over cells based on variable [closed] - excel

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 4 years ago.
Improve this question
I'm working on a budgeting spreadsheet that has a different replacement cycle for equipment and I want to visualize when everything will be scheduled to be replaced.
Column 1=name, Column 2=deployed, Column 3=expected life, Column 4=retire date, Column 5=price
I want to have another table next to it that shows the next several deploy dates (for the next 15 years) based on the expected life. Right now, I'm having to manually count over X number of cells and enter in the price and then count over again.... for each row.
I know there has to be a automated way to do this, but I'm new to excel macros and I've looked at several functions, but can't get anything figured out. What functions should I be looking at?

A formula like:
=IF((G$1-YEAR($B2))/$C2=ROUND((G$1-YEAR($B2))/$C2,0),$E2,"")
Should do the trick
(the above for column G, it is assumed the year is in G1)

Related

How to automate the creation of a list based on an integer input in Excel [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 3 years ago.
Improve this question
This is undoubtedly a very simple problem, but I don't have much experience with coding in Excel.
In this example, I would like the user to input the # of students into cell B3.
After inputting the # into the cell (for example, if the person input 5), I would like to create that number of rows from A4-A9 based on the notation Student_# (Student_1, Student_2, Student_3, Student_4, Student_5).
If the person put in 10, I would like there to be 10 rows of Student_1 through Student_10 (updated automatically).
The "Student_" will be static as this is an unidentified list, I'd just like to create the number of rows based on this initial input value.
Thanks in advance for any help.
In A5 put:
=IF(ROW(A1)<=$B$3,"Student_" & ROW(A1),"")
And copy down enough to cover the largest number allowed in B3
If one has the Dynamic Array formula simply put:
="Student_"&SEQUENCE(B3)
In A5 and Excel will spill the results down.

Copy selection of numbers in a particular order into Excel [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 3 years ago.
Improve this question
In one part of my spreadsheet, I am calculating odds ratios. I have one column (V) with the OR, and then W and X with the confidence intervals. In another column (M), I am trying to get excel to list this information in one cell.
i.e.
0.78 (0.25, 2.46)
I have just been copying the information, but this is prone to errors and takes ages, so I am looking for a better way.
Any ideas?
Try a formula like:
=[#columnV]&"("&[#columnW]&","&[#columnX]&")"
This should concatenate row wise down the entire table with the desired format.

Looking for a formula that recognises different digits in a cell [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 4 years ago.
Improve this question
I am creating a spreadsheet where the user can enter different numbers and have a different result be returned.
For example if they were to enter a number that started 07, it would show 1, 070 it would show 2, 0345 3 and so on.
I have tried the IF and LEFT formulas but I am struggling!
Any ideas are greatly appreciated!
EDIT: Sorry I was trying not to write war and peace but have missed out too much.
The users will write in phone area codes, e.g. 0345 or 0714 or 0701 and the sheet will return the price.
The price can be different depending on the first 4 digits. To keep it simple for this purpose I want it to be able to detect if the area code starts with 07 to show a "price" of 1, 070 price of 2 and 0345 a price of 3.
I have 10 different area codes but just added the 3 above for examples.
I hope this is clearer.
To get the length of a string with the leading zeros removed use the array function
=LEN(MID(A2,MATCH(TRUE,(MID(A2,ROW(INDIRECT("1:"&LEN(A2))),1)<>"0"),0),LEN(A2)))
Replace A2 with the cell that the users will change and hit [Ctrl Shift Enter] on the cell with the formula to activate the array function.

how do I generate random timestamps in Excel [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 4 years ago.
Improve this question
I need to generate a bunch of random times in Excel 2013.
The time needs to be between 7AM to 8:45AM
The number of rows varies but they are typically between 30 to 60
Using a formula in a cell (for times ranging from 7:00:00AM to 8:44:59AM):
=TIME(7,RANDBETWEEN(0,104),RANDBETWEEN(0,59))
In Excel, one day = 1
7AM = 7/24
845AM = 8.75/24
Enter the formula:
=7/24+RAND()*(8.75/24-7/24)
On the Home tab of the Ribbon, select 'Time' from the dropdown in the Number area.
This will generate a random time starting at 7am and continuing through 845am.
Fill the cells with:
=RAND()*(0.364583-0.291667)+0.291667
you want to generate random time between two given times, such as generate time from 6 o'clock to 9 o'clock, you can use below formula. Type this formula: =TEXT(RAND()*(8:45-7)/24+6/24,"HH:MM:SS") into a blank cell, and drag the fill handle over to the range that you want to insert the time.

Excel Ranking with multiple conditions [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
https://www.dropbox.com/s/05f82d5piw0pfd2/Book1.xls
Hello everyone, can anyone show me how to deal with above ranking issue that I try to solve.
What I like to have is only ranking Names Occurrence when Month = February and Item = Item 1, also, ignore all item 2 with what even names and months between it.
Also, since I have more records, if possible could you please tell me how to apply ranking to whole columns.
Currently I try to use
=SUMPRODUCT(--(A:A=A2),--(C:C=C2),--(B:B=B2)--(D2=D:D))`
but looks like it doesn't work that way.
Add a helper column in column E (which can later be hidden) that screens out the rows you want to exclude:
=IF(AND(A2="Item 1",C2="February"),D2,"")
which would of course be copied down to the bottom of your data.
Then do the ranking in column F of the formula results in column E:
=IFERROR(RANK(E2,E:E),"")
again copied down to the end of the data.
The SUMPRODUCT might look something like this. I don't fully understand why you only rank 3 of those 18 items; this sumproduct ranks all 11 of the ITEM=1 MONTH=FEBRUARY rows [it also, separately, ranks the other rows, but you can just wrap this in an IF and suppress those].
=1+SUMPRODUCT(($A$2:$A$18=A2)*($C$2:$C$18=C2)*($D$2:$D$18>D2))
Reading that again, I guess you are really overcalculating the D column (that seems to be the number of C showing up). You could use COUNTIF to see if you are on the first row with that NAME, I think.

Resources