Random values, only duplicates excel - excel-formula

i wanna make a sheet with random duplicates, column A will have 100 rows, in this column, will be blank rows, but will be a name let s say "John" which will be repeted in percent of 10% from 100rows.. But i will need another sheet with an percent of 5%.
Where to start?
I tried with rand, randbetween but i can t put the percentage with repeted duplicate (10/100)
https://i.stack.imgur.com/yAYOb.jpg

Related

How to sum all 1,000 rows to get 1,000 sums in Excel?

I have 1,000X1,000 columns and rows full of numbers. If I want to sum each rows, from Row 1 to the last 1,000 rows. Each row has 1,000 numbers in each columns, I want to sum this up
To sum the first 1000 cells in Row 1, add a cell with this formula:
=SUM($A1:$ALL1)
Then, copy-paste that cell into 999 cells below it. The formulas will read:
=SUM($A2:$ALL2)
=SUM($A3:$ALL3)
...

Calculations at the bottom of each column

I am using an excel spreadsheet to keep track of some data.
I calculate median and quartile values for each column at the bottom of those columns (rows 15, 16, 17). However, I want to be able to keep adding new values into columns without changing the range of my median/quartile formula. I know I can select the whole column in my formula if I had the formula in a different cell than the column I am making calculations on.
I am wondering if there is a way to exclude the rows with my median and quartile formulas from my calculations. As I enter more data, those locations will also increase and I couldn't figure it out.
So if we know the number of blank lines to be two, before we do the median, then =median(INDIRECT(CONCATENATE("B2:B",text(row()-3,"#"))))
works, by constructing the range of column B fed to the median function to be B2 through B + whatever number is 3 up from the row where the formula sits. For the IQR presumably 3 must be increased.

Counting the total amount of rows which bear negative values with corresponding row

I am in need of a formula, which counts the sums of two rows for a whole column.
e.g.
I have data in column A and column B and would like to make a count of the sums for A1+B1, A2+B2, etc.. for around 1800 rows. If one of the columns is empty, it should not be included in the count.
This is to find out how many negatives I have in my column when adding A1 + B1, A2+ B2 and so on...
I try to explain it in the link to the picture.
http://i.stack.imgur.com/HlZPa.png
Basically I could do it with an extra column but since I have 50+ customers I would have to add a column for each to make the diff, so I was hoping to express the Yellow column in a formula so I only have to adapt that instead of insert a calculation column for each column.
Thanks for any tips!
You could filter the rows based on some values to get all rows containing negative value if this is what you wish to achieve.
follow these steps:
Select The column that contains negative values.
click on the "Data" tab.
Click "Filter" or Cntrl+Shift+L.
Click the black arrow pointing down on top of the column you have selected.
Select "Number Filters"
Click "Less Than"
Type 0 (zero) and hit Enter.
you should have only the cells containing negative values displayed.
If you need to get the total rows containing positive values in a column, use this formula
=MIN(COUNTIF(A:A,">0")) where column is "A"
To get the total of negative cells in a row, you can use
=MIN(COUNTIF(A:A,"<0")) where column is "A"

calculating sum based on multiple sheets

I am using following formula to calculate sum based on multiple sheets, here is the scenario
Total 2 sheets, Data and Translation,
In Data sheet i have employee name in C Column, Hours in J column,
In Translation sheet i have Department in A Column, Employee name in C column, and Rate in E column, so i have Department name, from that name i need to calculate total $ spent,
I have following formula, that will capture total rate (COUNTIF(H7,Translation!$A$2:$A$27)*Translation!$E$2:$E$27)
but its not calculating total hours (LOOKUP(IF(H7=Translation!$A$2:$A$27,Translation!$C$2:$C$27),'Data '!$C$2:$C$410,'Data '!$J$2:$J$410)
Please let me know
=SUMPRODUCT(IFERROR(LOOKUP(IF(H7=Translation!$A$2:$A$27,Translation!$C$2:$C$27),'Data '!$C$2:$C$410,'Data '!$J$2:$J$410),0)*COUNTIF(H7,Translation!$A$2:$A$27)*Translation!$E$2:$E$27)
You can't use LOOKUP here because the lookup range isn't sorted ascending - you can use SUMIF in place of LOOKUP, try this "array formula"
=SUM(SUMIF(Data!C2:C500,IF(B2=Translation!A2:A500,Translation!C2:C500),Data!J2:J500)*COUNTIF(B2,Translation!A2:A500)*Translation!E2:E500)
confirmed with CTRL+SHIFT+ENTER

Extract top 10% of column values in Excel and place in another column

I have an excel spreadsheets with values in one column. What i need is a VBA code that will identify top 10% of column values, and place them in a adjacent column.
Why not ignore VBA and use the percentile function to create a true false column and filter on that.
EG. Is the Value in B2 in the top 10% of values in Column B?
=B2>=PERCENTILE($B$2:$B$17,0.90)

Resources