Finding Only numbers between specific range in cell contain text string - google-sheets

I have a cell A2 containing following Text string in google sheet.
UAE Vacancy - Collections Field agents. Location - Dubai, Abu Dhabi Work profile- banking collections background outdoor field. Age- Below 30 years. Salary - AED 5500 + quarterly incentive and yearly bonus. Minimum 1-year of experience in collections is required in the UAE Banking industry. Candidates meeting the criteria, share their resume on
test#test.com
with subject 'Field agent' Reference -
from UAE Jobs #uaejobs #bankjobs #collectionagency #dubaijobs #hireinuae
Now in Cell B2 I want to extract salary which is 5500 a numeric value. i tried to figure it out with is number but it is not working.
How can i extract numbers in next cell.
Thanks

Try:
=VALUE(REGEXEXTRACT($A2, "[0-9]{3,}"))
This will extract the first number with 3 or more digits.
See on Google Sheets

Related

Google Sheets: Filter cells with text and numeric value greater than x

I built a scraper for the Twitter account of a local transportation network to find out how many bus and tram rides are cancelled each day. All my results are listed in a Google Sheets table. I now want to build one table sheet with the information on all trams and another one with the information on all busses. They differ in their numeration: tram lines are numbered 1 - 20 (in German "Linie 1", "Linie 2", and so on), whereas the bus numbers are greater than 100.
How can I write a filter command to combine text and number range? That*s what I've got so far, but I don't know how to insert the 1-20 or >100 range behind the word "Linie"...
Additional note: As there are other numbers in each tweet, the number has to follow directly after the word "Linie".
=FILTER(Tabellenblatt1!C:D; REGEXMATCH(Tabellenblatt1!C:C; "Linie"))
You can use REGEXEXTRACT to get the numbers after Linie like this:
REGEXEXTRACT(Tabellenblatt1!C:C, "Linie (\d+)")
With INDEX you'll be able to check the whole range, and since REGEXEXTRACT returns a string you can multiply by one to get its value and compare to your desired numbers:
INDEX(REGEXEXTRACT(Tabellenblatt1!C:C, "Linie (\d+)")*1)<=20
Then you can use both conditions summed to get those that are under 20 and more than 100:
=FILTER(Tabellenblatt1!C:D, (INDEX(REGEXEXTRACT(Tabellenblatt1!C:C, "Linie (\d+)")*1)<=20)+(INDEX(REGEXEXTRACT(Tabellenblatt1!C:C, "Linie (\d+)")*1)>=100))

Using Sumifs, where a range can match multiple criteria

I have 2 sheets in Google Sheets:
All contacts w. week/month/year, where we pull all of our deals for the year
Weekly Marketing analytics, where we match up all of this information on a weekly basis
In the Weekly Marketing analytics, every column from B2 to BB2 is a week number (1-53), and A1 is the current year (2021 with this sheet).
I am currently trying to find and sum, every deal value on a 10 week running average (week 1-10, 2-11 etc.) and in order to do that, I've created this formula:
=SUMIFS('All contacts w. week/month/year'!$D:$D;'All contacts w. week/month/year'!$T:$T;$A$1;'All contacts w. week/month/year'!$Q:$Q;C$2:L$2; 'All contacts w. week/month/year'!$E:$E; "ORGANIC_SEARCH")
'All contacts w. week/month/year'!$D:$D - This is the column with all of the revenue for a given deal.
'All contacts w. week/month/year'!$T:$T;$A$1 - This is the column with the year of the deal.
'All contacts w. week/month/year'!$Q:$Q;B$2:K$2 - This is the column I am having trouble with. This is the column with the week number of the deal, and since I am doing a 10 week running average, I want every deal for the last 10 weeks. So all deals from week 1, 2, 3 etc that matches all of the other criteria.
'All contacts w. week/month/year'!$E:$E; "ORGANIC_SEARCH" - This is the last criteria, defining which marketing channel the deal originated from.
Currently this formula returns 0, despite there being a deal in week 4, and I cant work out why the system is missing it?
In the bigger picture, this is the for I want to end out with:
=IF(SUM(C$116:L$116)>0;SUM(SUM(C$143:L$143)/SUMIFS('All contacts w. week/month/year'!$D:$D;'All contacts w. week/month/year'!$T:$T;$A$1;'All contacts w. week/month/year'!$Q:$Q;C$2:L$2; 'All contacts w. week/month/year'!$E:$E; "ORGANIC_SEARCH")); 0)
Quickly checking if there is any deals counted in those weeks, if yes then sum up the marketing cost for a given channel, divided with the revenue of the deals for those given weeks.
It's hard to say without seeing the actual data, but it looks like the Criteria2 argument is problematic, because C$2:L$2 is really an array of criteria. So depending on your version of Excel, it would return either a spilled array or the first element of the array (basically only using C$2 as a criteria.)
If the week numbers are numeric (1,2,3 etc.) instead of text (Week1, Week2, Week3, etc.) then you ought to be able to break it out into 2 criteria using inequalities. For example, suppose L2 is week 11. That means the expression L2-9 provides your lower bound of 2. So in your SUMIFS function you should sum everything greater than or equal to L2-9 AND less than or equal to L2.
Your formula might look something like this:
=SUMIFS('All contacts w. week/month/year'!$D:$D;'All contacts w. week/month/year'!$T:$T;$A$1;'All contacts w. week/month/year'!$Q:$Q;">=" & L2-9; 'All contacts w. week/month/year'!$Q:$Q; "<=" & L2; 'All contacts w. week/month/year'!$E:$E; "ORGANIC_SEARCH")

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")

How to track Indian Mutual Funds using Google Sheets and update the price automatically

Looking to manage the mutual fund portfolio, and automatically update the price so the portfolio always shows the correct information.
I have tried to use Google sheet functions like
INDEX
SPLIT
VLOOKUP
IMPORTDATA
=IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt")
=INDEX(SPLIT(VLOOKUP(A2&"*",NAV!$A$1:$A$20501,1,false),";"),,5)
The outcome of this is to create a portfolio with an automated price update.
You can easily use GOOGLEFINANCE APIs to do this. Suppose you want to track price of SBI Magnum Taxgain Scheme Direct Growth.
You can do this in the following steps:
Go to Google Finance.
Get the Google Finance Ticker symbol or Stock Id for the fund. For example:
MUTF_IN:SBI_MAGN_TAX_VQNUL5 for SBI Magnum Taxgain Scheme Direct Growth.
In a new Google Sheet use the following method to get current price of the MF.
=GOOGLEFINANCE("MUTF_IN:SBI_MAGN_TAX_VQNUL5")
For example see:
Medium Article
video tutorial
sheet
Create a spreadsheet on Google Spreadsheets. Name the spreadsheet as you need.
Let us create a sheet and name the sheet as "NAV". This sheet will hold all the latest NAV and will be updated with the latest price automatically. Let us visit this sheet later for automating the price update.
Now, let us create a new sheet, call it "Portfolio".
Create columns in the 1st row as follows:
AMFI Scheme ID
Account Number
AMC
Scheme Name
Unit Balance
Cost - Dividends
Value
Returns
Return (%)
AV Cost / Unit
NAV
NAV Date
Let us shift the tab to "NAV". In the column, A1 enter the formula as
=IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt")
This will update the NAV automatically and we will use this data to update information in our portfolio. This will have the following columns now:
Scheme Code
ISIN Div Payout / ISIN Growth
ISIN Div Reinvestment
Scheme Name
Net Asset Value
Date
Now find the scheme you have invested in from the NAV tab and get the Scheme Code and copy to AMFI Scheme ID column on "Portfolio" sheet. Similarly, you can copy the Scheme Name.
Get your statement from the AMC and update the Unit Balance, Cost - Dividends columns.
In the "Portfolio" sheet enter the formula against NAV
=INDEX(SPLIT(VLOOKUP(A2&"*",NAV!$A$1:$A$20501,1,false),";"),,5)
In the "Portfolio" sheet enter the formula against NAV Date
=INDEX(SPLIT(VLOOKUP(A2&"*",NAV!$A$1:$A$20501,1,false),";"),,6)
Value column is the product of Units x NAV
Returns are Value-(Cost-dividends)
Return % is Returns / (Cost-dividends)
AV Cost / Unit is (Cost-dividends) / Unit Balance
Now create a summary line in the bottom for Cost-Dividends, Value, Returns and Return %
Voila! Your portfolio will be updated automatically when you open the spreadsheet. Just ensure you update unit balance and cost-dividends for accurate computations.
Most of the stocks and mutual funds are available via Google Finance API which Rishabh's answer explains clearly.
But Google finance doesn't have data for many Indian mutual funds like Axis Blue Chip Direct plan - Growth, Parag Parikh Flexi Cap Fund Direct Plan-Growth, etc.
Suresh's answer is a different yet effective way to add NAV and other details into google sheets but that formula is outdated and it no longer works in google sheets. So, I am answering this question with the new tested approach.
Steps to get the NAV for any mutual fund not present in Google Finance
As Suresh mentioned, create two sheets. One for portfolio and the other for NAV
In the first cell of the NAV sheet, enter the formula as
=IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt")
Now, search for the mutual fund, I'm taking Axis BlueChip fund direct growth as an example.
Have a look at this image of Axis BlueChip direct plan growth mutual fund in NAV sheet
Note the row number for the mutual fund and in our case, it is 5507
Notice how the value is separated by ";" delimiter and we need to get NAV which is on 5th position (or column if separated by a delimiter)
To get the NAV value extracted from the specified row number of NAV sheet in the portfolio one, do the following
=INDEX(SPLIT(NAV!$A$5507,";"),5)
Breaking down,
NAV!A$5507: It means, we're extracting row number 5507 from the NAV sheet
SPLIT(NAV!$A$5507,";"): Since, the delimiter is ";", we're splitting it on ";" which will give us 5 columns (If you're confused, look at NAV sheet data again. There are a total of six fields Scheme Code, ISIN Div Payout/ ISIN Growth, ISIN Div Reinvestment, Scheme Name, Net Asset Value, Date)
=INDEX(SPLIT(NAV!$A$5507,";"),5): After splitting, we're choosing the 5th column which is NAV and that's how the above function works and we get the NAV value of the fund automatically.
Once, we get the NAV value, we can add the quantity and buy avg value of our stock/mutual fund in another column of the portfolio sheets
Then, with a simple operation, we can get the total value of our investment in sheets.
For example,
=(E6-C6)*B6
Cell E2 : Updated NAV price
cell C2 : Buy average price
Cell B2 : Quantity
I'd like to acknowledge my friend Abhilash who taught me to manage my stock portfolio by Google Sheets.
For the whole list of Schemes and their latest NAV try the following:
First row:
A1 = Scheme Code
B1 = ISIN Div Payout/ ISIN Growth
C1 = ISIN Div Reinvestment
D1 = Scheme Name
E1 = Net Asset Value
F1 = Date
In B2: paste the following:
=ArrayFormula(SPLIT(FILTER(IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt"),isnumber(left(IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt"),2)*1)=true,IMPORTDATA("https://www.amfiindia.com/spages/NAVAll.txt")<>""),";"))

How to implement a custom number format that will look like "30c - $19.70"

I'm creating a spreadsheet for keeping track of my stock trades. This column will be called "Risk" and it will show how much money I want to risk per share on trade and at what price I will have to close the trade at if prices go against my position. So, for example, if I bought shares of Ford at $20 and was willing to risk losing 30 cents per share before closing the trade, I want to be able to type "30 19.70" in a cell and have the custom number format change it to "30c - $19.70". How do I implement this?
I have tried using the following custom number format on Google Spreadsheets but it doesn't work:
0 "c - " $0.00
I input the following into a cell: 30 19.70
I want this result to be: 30c - $19.70
But I'm getting this output: 30 19.70
unfortunately, this is not possible for several reasons:
your entry: 30 19.70 is not a number. it's a text string. that's why 0 "c - " $0.00 will never work because those zeros are trying to find numbers to catch up on them, but your entry is not a number.
text can't be divided in between with "c - ". you can have #"c - " or "c - "#, but #"c - "#.# will output: 30 19.70c - $30 19.70.30 19.70
best you can do is to enter 30 in one cell and 19.70 in another cell and use a formula in a 3rd cell:
=A145&"c - $"&TEXT(B145, "##.#0")
or: =JOIN("c - $",INDEX(SPLIT(A150," "),1,1),TEXT(INDEX(SPLIT(A150," "),1,2),"##.#0"))

Resources