Google Sheets - Percentage Calculation - google-sheets

Would do this manually but it would be best done auto.
Column A is product name.
Column B is Product Price.
Column C should be Column B entry plus a percentage (in this case VAT which is currently 21%
How would I achieve this?

If B2 has price in it then in C2 you can write =B2*(1.21) to make it
21% higher than B2.
– Amit Singh

Related

vlookup several criteria and a range

Here's my table:
Exchange No.
Name
Tier
30d Volume (higher than)
Maker
Taker
Specials
1
FTX
1
$0
0.0200%
0.0700%
FTX
2
$2,000,000
0.0150%
0.0600%
FTX
3
$5,000,000
0.0100%
0.0550%
FTX
4
$10,000,000
0.0050%
0.0500%
2
Binance
Regular User
$0
0.0120%
0.0500%
Binance
VIP 1
$15,000,000
0.0120%
0.0500%
Binance
VIP 2
$50,000,000
-0.0100%
0.0500%
I want to retrieve the correct fees in another table as follows:
Volume (past 30d):
volume variable, ie $10,000
FTX
Binance
Column #
2
3
4
IN:
Maker
correct fee
correct fee
OUT-stop:
Maker
correct fee
correct fee
OUT-profit:
Maker
correct fee
correct fee
OUT-manually:
Maker
correct fee
correct fee
B3 cell (second table) should take the fee in cell E2 (of the first table).
Why?
Cause:
C1 (of second table) says "FTX" as per column B row 2:5 (of first
table)
Volume (in B1 of second table) is higher than D2 but lower than D3 (of first
table)
B3 (of second table) says "Maker" which is column F (of first
table)
So I tried to do a vlookup but only my criteria No. 3 would work with vlookup.
Other criteria are a range higher than (No. 1) and two different columns as "index" (in vlookup formula) which are, by the way, the searched text... (No. 2)
Someone has an idea to take into account those special criteria in vlookup, or similar, please?
try:
=INDEX(VLOOKUP(M2, QUERY({'Exchange Fees'!B2:B&":", 'Exchange Fees'!D2:D,
FILTER('Exchange Fees'!A2:G, 'Exchange Fees'!A1:G1=M3)},
"select Col2,Col3 where Col1 = '"&N2&"'", ), 2, 1))

Using COUNTIF's & Total Sums In Google Sheets To Work Out A Financial Total Sum

I'm looking for a specific Google Sheets formula. I believe it's using COUNTIFS & SUMIF, but I can't work out how to do it, any help would be really appreciated.
So, my "C" column has a number of letter combinations in each cell... These are "FHG" "CS" "MO" and afew others. They are a reference to specific market trading strategies and I'm using this sheet to track every trade I make. So C3 may contain "FHG" C4, "MO" C5, "FHG", C6 "FHG" etc.
In the "I" column, there is a 'profit and loss' column which states how much was generated/lost for that particular row... These are formatted to currency.
At the top of my sheet, I have a summary list of each set of letters and I'm using a COUNTIF statement to work out the total number (instance count) of each particular letter combo and from there, I can work out strike rates, percentages etc.
The thing I can't work out is, 'is there a way to count/sum the relative numbers in the "I" column based on a specific letter combo?' For example, let's say running down today's trades, FHG appears on C3, C6, C8, C12, C16 etc. can I collect and sum the numbers (to create a total) from the corresponding P&L column, I3, I6, I8, I12, I16 etc?
My main aim is to have the following at the top in my "Summary Section":
'Letter Combo/Name Of Trading Technique' - 'Number Of Trades' (Using COUNTIFS down C Column) - 'Total % Win Rate' (Number Of Winners/Number Of Total Trades For Said Strategy - This is done using a separate column of Y or N for winners or losers) - The one that I need help with is - "Total Sum Of Money Generated For Each Particular Letter Combo (Trading Strategy)"...... I've worked out how to do the first 3 columns, but I can't work out how to pick the numbers out from the P&L column (I) based on what kind of trade (letter combo) exists in the corresponding (C) column.
If every trade made the same about of money, this would probably be an easy calculation, but because each return is different, this is proving challenging.
Thanks for any insights :)
try:
=QUERY(A:I; "select C,sum(I) where A is not null group by C label sum(I)''")
or just for SB:
=QUERY(A:I; "select C,sum(I) where C = 'SB' group by C label sum(I)''")
if you want a count too:
=QUERY(A:I; "select C,count(C),sum(I) where A is not null group by C")

Check columns, if one is bigger or equal to the adjacent cell in column A, style it differently

I have 10 columns with price data in.
Column A has my product SKU
Column B - has the cost price of a product
The other columns have other prices in them.
Link: https://docs.google.com/spreadsheets/d/17PLI_d_05uYnzOt2yL4ZQA3XB89rIz9vQJnIOBidMz8/edit?usp=sharing
I want to go through each cell in a row and see if any of the prices listed are less than, or equal to, the cost price in Cell A.
How would I write this in Google Sheets?
I believe the correct way to do this is the following formula:
=$D2:$K2<=$B2
To check if there is any price below (or equal) to a certain value, you could check the minimum price and compare that. So use the MIN function and compare that with the value at B2.
=MIN(D2:K2)<= B2
You have posted a solution but you are comparing a range with a value, and for me it does not work.

Getting a column header from the min value, excluding zero

I'm trying to make a spreadsheet to find the best price of a product in Google Sheets. I have the product description on B column, starting from the sixth row and below, the prices are on column E6 and on, (F6, G6, H6,...) Each supplier name is written on the fist row of their Columns. The lowest price is in column C and Column D displays the supplier with that price.
I've tried the min() function, but there's an issue, I need it to bypass 0 values.
On column C, I'm using this code =min($E6:$Z6) and for displaying the supplier I'm using =index($E$1:$Z$1,0,match(min($E6:$Z6),$E6:$Z6,0))
I'll add a screenshot of the problem.
wrap it into simple IF or IFERROR
=IF(MIN($E6:$Z6)=0, , MIN($E6:$Z6))
and the second one:
=IFERROR(INDEX($E$1:$Z$1, 0, MATCH(MIN($E6:$Z6), $E6:$Z6, 0)))

How to get weighted average while skipping rows with a string on Google Sheets?

I want to get weighted average of values in column A with weights in column B. Problem is that column A might have string values and I want to skip these rows from calculation. Unlike =AVERAGEIF, function =AVERAGE.WEIGHTED does not have this implemented.
How do I do it? And how would I do it if column B could also have strings (for future proofing)?
=AVERAGE.WEIGHTED(FILTER(A:A,ISNUMBER(A:A)),FILTER(B:B,ISNUMBER(A:A)))
=SUM(FILTER(A:A*B:B / sum(FILTER(B:B,ISNUMBER(A:A))),ISNUMBER(A:A)))
=SUM(FILTER(A:A*B:B / (sum(B:B) - SUMIF(A:A,"><", B:B)),ISNUMBER(A:A)))
case both columns contain strings, add 1 more condition for each formula:
=AVERAGE.WEIGHTED(FILTER(A:A,ISNUMBER(A:A),ISNUMBER(B:B)),FILTER(B:B,ISNUMBER(A:A), ISNUMBER(B:B)))
So let us suppose our numbers (we hope) sit in A2:A4 and the weights are in B2:B4. In C2, place
=if(and(ISNUMBER(A2),isnumber(B2)),A2,"")
and drag that down to C4 to keep only actual numbers for which we have weights.
Similarly in D2 (and drag to D4), use
=if(and(ISNUMBER(A2),isnumber(B2)),B2,"")
and in E2 (and drag to E4) we need
=if(and(ISNUMBER(C2),isnumber(D2)),C2*D2,"")
then our weighted average will be:
=iferror(sum(E2:E4)/sum(D2:D4))
you can hide the working columns or place them in the middle of nowhere if you wish.

Resources