Wednesday, 14 December 2022

Diaries on VBA- Scripting Dictionary

 

1. Part 1- Basics of Dictionary


a) Dictionary is used to assign a value to a key/item

b)Syntax

i) If I want to create Gowtham as new dictionary

Dim Gowtham as Newdictionary

ii) Add items to the dictionary Gowtham

For Eg. I want to assign 1 to a, 2 to b


gowtham. add(a,1)

gowtham. add(a,2)


c) When a key is not already declared and is called later, it will get created in dictionary

For Eg,



Sub usedictionary()


Dim dict As New Dictionary


dict.Add "a", 1

dict.Add "b", 2

dict.Add "c", 3

dict("d") = dict("d") + 100


Debug.Print dict("d")

 

End Sub


..., the above code will print 100 

Tuesday, 6 December 2022

Macro to count the number of characters in cells and populate the data set sperately

  1. Object of  the Macro



I want to:

  • count the number of HSN digits in Column A, 
  • get them populated in Column C, 
  • filter the items with HSN less than 6 digits and
  • get the dataset pasted at the cell H1.



2. The Code


Sub countcharactersincell()

Dim a As String

Dim b As Integer

Dim i As Integer

Dim j As Integer

Dim k As Integer

j = Cells.End(xlDown).Row

For i = 2 To j

a = Cells(i, 1) 

b = Len(a)

Cells(i, 3) = b

Next i

Range("A1").AutoFilter Field:=3, Criteria1:="<6"

Range("a1:c" & Range("a1").End(xlDown).Row).SpecialCells(xlCellTypeVisible).Copy

Cells(1, 8).PasteSpecial

End Sub


3. Output 




Funfact:

The same output could be achieved with a simple "Sorting" option of Excel. 

But, I'm crazy about those "Mootai poochiyai kollum navina machine"

 

Monday, 28 November 2022

Tech Hack Tit-Bits

1. Convert YouTube Videos into Pdf pages using


2. Need a disposable mail for temporary use like signing up..? Here you go, 



3. Need to do content writing, without travail.. 




(will add more..)

Sunday, 7 August 2022

Trade Strategies

 1. MACD Trend Following Strategy


A general MACD 







https://tradingstrategyguides.com/macd-trend-following-strategy/


2. Using Moving Averages Perfectly



a. For cross over purpose, use both 20 days and 50 days moving average

b. Some stocks might not react to cross over. Hence backtest before you use

c. Use ATR trailing stoploss indicator to fix the exit point

d. Use stochaistics indicator too in addition to the moving average

e. Combining the PSAR or Supertrend with moving average cross-over would giver better results

Technical Indicators

  1. Williams %R

  • This is basically a momentum indicator.
  • The value of the indicator oscillates between 0 and -100.
  • %R reading above -50 means the price is moving upward. A reading near -100 means oversold levels.





2.  MACD

  • The MACD displays a MACD line (blue), signal line (red) and a histogram (green) - showing the difference between the MACD line and the signal line.




  • When the MACD line crosses ABOVE the zero line, this signals an UPTREND
  • When the MACD line crosses BELOW the zero line, this signals an DOWNTREND

  • When the MACD line crosses ABOVE the signal line, traders use this as a BUY indication
  • When the MACD line crosses BELOW the signal line, traders use this as a SELL indication


  • When the MACD line is above the signal line, then the histogram will be positive. 
  • The opposite is true when the MACD line sits below the signal, whereby the histogram will plot below the zero as a negative value.

3. Stochastic Indicator

The stochastic oscillator has 2 lines (%k) and (%d). 

%K = (C-L5close)/(H5-L5) * 100

%D = 3-day SMA of %K.

where,
C = the most recent closing price.
L5 = the low of the five previous trading sessions.
H5 = the highest price recorded within the same 5-day period.

However, the period can be changed.

The 2 lines cross each other and we consider this as the buy/sell signal. 

We call the %k line crossing the %d line above as the buy signal. Whereas we call the %k crossing the %d line below as the sell signal.

The traders consider a stochastics value close to 0 as oversold, i.e, market is enough sold and can bounce back any time. Whereas they consider the stochastics value close to 100 as overbought, i.e, the market is enough bought and can take a correction any time.




Wednesday, 15 June 2022

194R- TDS on benefits or perquisites provided

 

1.       Transactions covered: Any benefit or perquisite, whether convertible into money or not

2.       Rate of TDS: 10%

3.       Threshold for deduction: Value of benefit/perquisite should be more than Rs. 20,000

4.       Payee: Only resident payees are covered u/s 194R.

5.       Who are liable to deduct tax: Persons whose turnover in the business or profession is greater than Rs. 1 Crore or Rs. 50 Lakhs in the preceding previous year

6.       When to deduct tax: At the time, when the benefit/perquisite is provided

7.       Intent behind the introduction of the provision

As per section 28(iv) of the Income tax Act, the value of any benefit or perquisite, whether convertible into money or not, arising from business or exercise of profession is to be charged as business income in the hands of the recipient of such benefit or perquisite. However, in many cases, such recipient does not report the receipt of benefits in their return of income, leading to furnishing of incorrect particulars of income

It has been noticed that as a business promotion strategy, there is a tendency on businesses to pass on benefits to their agents. Such benefits are taxable in the hands of the agents. In order to track such transactions, I propose to provide for tax deduction by the person giving benefits, if the aggregate value of such benefits exceeds Rs. 20,000 during the financial year.

(Para 138 of FM’s speech, Budget 2022-23)

8.       Circular 12/2022- Guidelines for implementation of Section 194R

a.       Deductor is under no obligation to check to whether the benefit provided is taxable as business income for the recipient or not.

b.      TDS shall be deducted even on benefits/perquisites provided in the nature of cash.

c.       TDS shall be deducted even on capital assets provided as benefit/perquisite.

d.      TDS need not be deducted on sales discount, cash discount and rebates.

e.      TDS shall be deducted on free samples.

f.        Value of benefit/perquisites

                                                               i.      Generally, value would be Fair market value of the perquisite

                                                             ii.      The value of the perquisite shall exclude the GST component




g.       Benefit/Perquisite given to social media influencers for product promotion




h.      Reimbursement of out-of-pocket expenses incurred by service provider

                                                               i.      Let’s say, A provides consultancy service to B. A incurs travel expense in the course of business. If this travel expense is invoiced in the name of A and B reimburses the travel expense to A/pays the travel expense directly, B is liable to deduct TDS u/s 194R. 

                i.         Expenditure incurred on dealers conference to educate dealers

                                                               i.      TDS shall not be deducted if:

1.       Conference is not in the nature of incentives/benefits to select dealers/customers who have achieved particular targets

                                                             ii.      TDS shall be deducted if:

1.       Expenditure incurred in the nature of leisure trip or leisure component, even if it is incidental to the dealer/business conference

2.       Expenditure incurred for family members accompanying the person attending dealer/business conference

3.       Expenditure on participants of dealer/business conference for days which are on account of prior stay or overstay beyond the dates of such conference

j.        How shall tax be deducted in case the benefit/perquisite is in kind?

                                                               i.      Recipient shall pay tax through advance tax challan.

                                                             ii.      Deductor shall obtain a declaration along with a copy of advance tax challan.

                                                            iii.      In the TDS return, the same shall be reported along with challan number

                                                           iv.      Form 26Q would carry the provisions for the same starting from this year

Alternatively,

i.         The benefit provider may pay the tax on behalf the benefit recipient.

ii.     The benefit provided shall include the tax paid and tax shall be deducted accordingly. i.e., Grossing-up provisions shall apply.

k.       For the calculation of liability as to whether the threshold limit of Rs. 20,000/- has been exceeded during the year or not, benefits provided since 01.04.2022 shall be taken into account.  

                                                                      

 

 

 

 

 

 


Monday, 18 April 2022

Getting unlimited storage in Google Drive for free

 Step 1

You need to go to one of the following sites:

https://td.msgsuite.workers.dev/

https://td.crackhub.site/

https://td.hackgence.com/


Step 2

 Insert Shared Drive name (My games, Free storage, etc.) & Your Gmail (You have to use the Gmail of your Google Drive account) & Click Submit or Create (depends on link), And that's it! You have an unlimited Google Drive Shared drive! To access it all you need to do is go to https://drive.google.com/ -> Shared Drives and you will see a new Shared drive there!


*Note: Please do not keep there any kind of personal files because there's a small chance that the shared drive will be deleted, Using this shared drive at your own risk.


Credit:  https://t.me/Re5ourceHub