Calculating using n number of values

Graemea

Board Regular
Joined
Oct 30, 2015
Messages
119
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a column of values and text, with the column header in cell A1 and in A2:A100 each cell contains either a number or “n/a”.

Can someone please suggest a formula that will allow me to calculate the STDEV.S of the last n (e.g. 15) numbers in the range. The formula needs to be able to ignore the “n/a” both in the count of the n items and in the calculation of the STDEV.S as the formula fails with non-numeric values.

Thanks!
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Just a quick thought but TAKE() should be able to return the last 15 rows:

Excel Formula:
=STDEV.S(TAKE(TOCOL(--A2:A100,3),-15))
 
Upvote 0
Thank you.

Unfortunately I don’t have access to that function on my version of Excel.
 
Upvote 0
Since the function "STDEV.S " ignores logical values and text in the sample.
I suggest you try to find all the N/As and make the cells blank.

Step1. Select Column A.
Step2. Press "Ctrl+G" then press "Alt+S" then press "F","U","X" in sequence, and then press "Enter".
Step3. Press "Del" to make all the N/A cells to be blank.
Done.
Then you can use "STDEV.S " as usual.
 
Upvote 0

Forum statistics

Threads
1,215,836
Messages
6,127,179
Members
449,368
Latest member
JayHo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top