Thursday, 1 November 2018

IMPROVISED NUMBER TO WORD WITH RINGGIT AND SEN NOTATION

NUMBER TO WORD WITH "RINGGIT" AND "SEN" NOTATION


I have improvised but have not tested the following codes.


You are free to C&P and use it but I shall not be bound legally arising from the use of the codes.


As per the earlier version, this version is still limited to 6 digit before decimal point/dot.
For codes up to 16 digits please email me at mohdarismail@gmail.com or @ whatsApp  


Please do leave comment so that I can improvise the codes.


The Malay version will be posted later.

I also have the code written number to word conversion in

Excel VBA for excel,
Google App Script for Google sheet ,
MS Access Database query,
mySql Database query
javaScript
.js for use with JSON



HOW TO USE ON GOOGLE SHEET



1. Open Google sheet


2. Cut & Paste the code from mohdarismail.blogspot.com


3. On your google sheet go to → Tools → Script Editor and paste the codes


4. Run the code from the Script editor


5. Watch your google sheet


6. Type your input value


7. You can drag and drop the in/output cell to any cell address you require the function to work.


Start ---->  


function N2W() {
var spreadsheet = SpreadsheetApp.getActive();
spreadsheet.getRange('A1').activate();
spreadsheet.getActiveRangeList().setNumberFormat('0.00');
spreadsheet.getActiveSheet().setColumnWidth(2, 600);
spreadsheet.getRange('A1:B1').activate();
spreadsheet.getActiveRangeList().setWrapStrategy(SpreadsheetApp.WrapStrategy.WRAP);
spreadsheet.getRange('B1').activate();
spreadsheet.getCurrentCell().setFormula('=\n\nIF(ISBLANK(A1),"<---- PLEASE ENTER YOUR VALUE IN CELL A1 ON THE IMMEDIATE LEFT COLUMN",\n\n\nif(\n\n(value(left(A1,(find(".",A1))-1)))>999999,"This version is limited to 6 digit (before decimal/dot) only",\n\n"Ringgit Malaysia : "&\n\nif((value(left(A1,(find(".",A1))-1)))=0,"Nil",\n\ntrim(if(\n\nAND(value(right((value(left(A1,(find(".",A1))-1))),6))>99999,value(right((value(left(A1,(find(".",A1))-1))),6))<1000000),\n\nindex({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,value(left(right((value(left(A1,(find(".",A1))-1))),6),1))+1)&" "&"Hundred"&" "&if(value(index\n\n({"100000","200000","300000","400000","500000","600000","700000","800000","900000"},1,value(left(right((value(left(A1,(find(".",A1))-1))),6),1))))/1000=value(left(right((value\n\n(left(A1,(find(".",A1))-1))),6),3)),"Thousand",""),"")&" "&if(AND(value(right((value(left(A1,(find(".",A1))-1))),5))>19999,value(right((value(left(A1,(find(".",A1))-1))),5))\n\n<100000),index({"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1,value(left(right((value(left(A1,(find(".",A1))-1))),5),1)-1)),"")&" "&if(AND(value(right\n\n((value(left(A1,(find(".",A1))-1))),5))>19999,value(right((value(left(A1,(find(".",A1))-1))),5))<100000),index\n\n({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,right(left(right((value(left(A1,(find(".",A1))-1))),5),2),1)+1)&" "&"Thousand","")&" "&if(AND(value(right\n\n((value(left(A1,(find(".",A1))-1))),5))>9999,value(right((value(left(A1,(find(".",A1))-1))),5))<20000),index\n\n({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,value(left(right((value(left(A1,(find(".",A1))-1))),5),2))-9)&" \n\n"&"Thousand","")&" "&if(AND(value(right((value(left(A1,(find(".",A1))-1))),5))>999,value(right((value(left(A1,(find(".",A1))-1))),5))<10000),concatenate(index\n\n({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,value(left(right((value(left(A1,(find(".",A1))-1))),4),1))+1)," ","Thousand"),"")&" "&if(AND(value(right\n\n((value(left(A1,(find(".",A1))-1))),3))>99, value(right((value(left(A1,(find(".",A1))-1))),3))<1000), concatenate(index\n\n({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,value(left(right((value(left(A1,(find(".",A1))-1))),3),1))+1)," ","Hundred"),"")&" "&if(AND(value(right\n\n((value(left(A1,(find(".",A1))-1))),2))>19,value(right((value(left(A1,(find(".",A1))-1))),2))<100),index\n\n({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (value(left(right((value(left(A1,(find(".",A1))-1))),2),1)))),"")&" "&if(AND(value(right((value\n\n(left(A1,(find(".",A1))-1))),2))>9,value(right((value(left(A1,(find(".",A1))-1))),2))<20),index\n\n({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,right((value(left(A1,(find(".",A1))-1))),1)+1),"")&" "&if(OR(value(right\n\n((value(left(A1,(find(".",A1))-1))),2))>20,value(right((value(left(A1,(find(".",A1))-1))),2))<10),index\n\n({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,right((value(left(A1,(find(".",A1))-1))),1)+1)\n\n,""))\n\n)\n\n&" "&\n\n"And Sen : "&trim(if((value(right(value(mid(A1,find(".",A1)+1,2)),2)))=0,"Nil",if(AND(value(right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),2))>19,value(right((value\n\n(right(value(mid(A1,find(".",A1)+1,2)),2))),2))<100),index({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (value(left(right((value(right(value(mid\n\n(A1,find(".",A1)+1,2)),2))),2),1)))),"")&" "&\nif(AND(value(right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),2))>9,value(right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),2))<20),index\n\n({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),1)+1),"")&" "&\nif(OR(value(right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),2))>20,value(right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),2))<10),index\n\n({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,right((value(right(value(mid(A1,find(".",A1)+1,2)),2))),1)+1),"")))&" "&"Only"))');
};


←- End


Selamat mencuba !!!

Sunday, 30 September 2018

KENANG JASA DAN PENGORBANAN AZMIN ALI DI PERINGKAT AWAL PKN (PKR)


KENANG JASA DAN PENGORBANAN AZMIN ALI DI PERINGKAT AWAL PKN (PKR)

Sebagai anggota parti antara yang paling senior di Sarawak, saya ingin berkongsi rekod perhubungan dan  persahabatan saya dengan seseorang yang bernama Azmin Ali  sejak awal penubuhan Parti Keadilan National (PKN).

Sebagai seorang yang masih muda, Azmin, ketika itu (belum YB lagi) telah memikul tanggungjawab yang amat besar mengemudi PKN (kini PKR) bagi pihak kepimpinan parti yang masih muda tatkala DSAI sedang digeluti kemelut kes penginayaan keatas beliau tatkaka anak-anak beliau masih kecil.

Dalam tahun 2001, saya berjumpa dengan Azmin yang ketika itu ditemani oleh Sdr Ghani Harun (saya tak pernah jumpa beliau sejak 2001) di sebuah hotel kelas sedarhana di Miri, dalam misi mengembangkan PKN dan sekali gus mencari calon untuk bertanding buat pertama kalinya dalam PRN Sarawak.

Sepanjang 4-5 hari perjumpaan kami di hotel di Miri, kita telah berjumpa dengan pelbagai pihak dalam mengatur urusan PKN. Sekali gus saya bertindak sebagai pemandu beliau ke hulu dan hilir di tempat yang baru dan asing. Jelas nampak pada beliau beban dan tanggungjawab yang amat besar dan berat, tatkala parti berhadapan dengan segala cemuhan, herdikan, makian dan tohman pihak lawan. 

Beliau amat tenang mempertahankan kedudukan parti dan DSAI dalam siri ceramah beliau di utara Sarawak diperingkat awal penubuhan PKN.

Semua itu juga saya pelajari dari beliau dalam mengharungi 20 tahun liku-liku yang beranjau dalam PKN dan PKR.

Bagi yang meragui, sangsi bersyakwa-sanga baik mau sebaliknya, secara peribadi, saya tidak pernah mendapat ganjaran material dari beliau dan jauh sekali mendapat "projek" maupun kedudukan khas walau pun sekembalinya dari Miri Sarawak beliau menang bertanding sebagai MP & ADUN di Selangor dan kemudian menjadi YAB Menteri besar dan sekarang menjadi menteri Persekutuan. Namun saya amat sanjungi beliau kerana amat kental dan konsisten dalam perjuangan melawan unsur dan amalan negatif dalam pentadbiran negara ketika itu.

Saya amat hargai persahabatan dengan YB Azmin yang tidak pernah luntur walaupun kita jarang-jarang dapat bertemu lebih-lebih lagi setelah sibuk dengan urusan parti dan Negara.

Untuk rekod, dalam perjumpaan 4-5 hari  di Miri dalam awal tahun 2001, dalam beliau sebuk menaip untuk mengeluarkan surat-surat watikah calon, saya rasa amat beruntung kerana merupakan calon PKN yang pertama mendapat dan menerima surat watikah Presiden PKN(PKR) di Sarawak mau pun seluruh Borneo untuk bertanding dibawah tiket PKN (sekarang PKR) bagi kawasan DUN55 Subis (Kini Bekenu)

Sejak peringkat infensi parti kita penggang tanggungjawab parti, walaupun setakat yang termampu, terdaya seadanya samada diperingkat cabang maupun diperingkat nasional.

Oleh itu saudara dan saudari sekelian hargailah seseorang seperti Sdr Azmin Ali dan jangan fikir kita ini selama ini dibela semata-mata oleh segala bentuk pemberian material oleh beliau. Malah ramai kawan-kawan dan teman yang telah meninggalkan beliau kerana desakan hidup.

Hargailah jasa beliau, tanpa Azmin PKN/PKR juga boleh sampai ketempat yang ada sekarang tapi tidak banyak yang sudi tunggu dan pikul tanggungjawab tatkala parti lalui zaman susah.

Saya dengan ini sepenuhnya menyokong penuh kepimpinan beliau dalam parti dan sebagai pemimpin diperingkat negara.

Wallahualam

Wassalam

Mohdar Ismail
KC Keadilan Sibuti
Ahli Majlis Pimpinan Pusat (Lantikan)

Thursday, 6 September 2018

GOOGLE SHEET WORKSHEET FUNCTION - NUMBER IN "RINGGIT" & "SEN" MALAYSIA CONVERTER


GOOGLE SHEET WORKSHEET FUNCTION - NUMBER IN "RINGGIT" & "SEN" MALAYSIA CONVERTER (LIMITTED VERSION - ONLY ALLOW 6 DIGIT TO THE LEFT OF THE DECIMAL)

(1) This worksheet function contain 4783 characters and it does not work on EXCEL work sheet because EXCELsheet only allow 255 characters into a single cell. By the way excel sheet has its own converter build in some 6-8 years ago and is written in visual basic. Google sheet can take 50,000 characters.


(2) Just cut and paste the worksheet function below. You can use it in your invoice, Cheque writer or legal document.

(3) This version is limited to 6 digit to the left of the decimal point. If the digit is more than 6, the function will tell you that you have exceeded the 6 digit allowed.

(4) Round your number to 2 decimal places.

Where to place your function on the sheet?

(a) For the purpose of this illustration place or paste the function below in cell B1
(b) Input your number in cell A1.... easy..easy

Note :  Make sure your number is not formmated with comas. Round your number to 2 decimal places, that is, you have 2 digit after a dot/decimal.

How to use it on your invoice?

Change the Cell location, eg in the function below the location of the formula is in cell A1. If your total invoice value is in cell K15, then change all the A1 to K15 by using any text processing app "Find and Replace". Once you changed the cell, the function will show the converted result.

Full version of up to almost Quadrillion ie {(10^15)-0.01} in English (US, English Canadian, Australian, and modern British),  Bahasa Malaysia in zip file at USD30.00. Can customize in other languages or dialect too. Function in JavaScript. Please inbox me. 

Selamat mencuba

Mohdar Ismail


Illustration






---------------------------------------------------------------------------------------------------------------

="Ringgit Malaysia :"&" "&(TRIM(IF(OR((value(left(A1,(len(A1)-3))))>999999,(value(left(A1,(len(A1)-3))))<1),"This version is limited to 6 digit to the left of a decimal or dot and rounded to two decimal places",(IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),6))>99999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),6))<1000000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),1))+1)&" "&"Hundred"&" "&IF(VALUE(INDEX({"100000","200000","300000","400000","500000","600000","700000","800000","900000"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),1))))/1000=VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),3)),"Thousand",""),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>19999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<100000),INDEX({"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),1)-1)),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>19999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<100000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),2),1)+1)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>9999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<20000),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),2))-9)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<10000),CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),4),1))+1)," ","Thousand"),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),3))>99, VALUE(RIGHT((value(left(A1,(len(A1)-3)))),3))<1000), CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),3),1))+1)," ","Hundred"),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>19,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<100),INDEX({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),2),1)))),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>9,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<20),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,RIGHT((value(left(A1,(len(A1)-3)))),1)+1),"")&" "&IF(OR(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>20,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<10),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT((value(left(A1,(len(A1)-3)))),1)+1),""))))&" "&"And"&" "&"Sen :"&" "& (TRIM(IF(OR(A1>999999,A1<1),"This version is limited to 6 digit (integer only)",(IF(AND(VALUE(RIGHT(A1,6))>99999,VALUE(RIGHT(A1,6))<1000000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,6),1))+1)&" "&"Hundred"&" "&IF(VALUE(INDEX({"100000","200000","300000","400000","500000","600000","700000","800000","900000"},1,VALUE(LEFT(RIGHT(A1,6),1))))/1000=VALUE(LEFT(RIGHT(A1,6),3)),"Thousand",""),"")&" "&IF(AND(VALUE(RIGHT(A1,5))>19999,VALUE(RIGHT(A1,5))<100000),INDEX({"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1,VALUE(LEFT(RIGHT(A1,5),1)-1)),"")&" "&IF(AND(VALUE(RIGHT(A1,5))>19999,VALUE(RIGHT(A1,5))<100000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(LEFT(RIGHT(A1,5),2),1)+1)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT(A1,5))>9999,VALUE(RIGHT(A1,5))<20000),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,VALUE(LEFT(RIGHT(A1,5),2))-9)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT(A1,5))>999,VALUE(RIGHT(A1,5))<10000),CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,4),1))+1)," ","Thousand"),"")&" "&IF(AND(VALUE(RIGHT(A1,3))>99, VALUE(RIGHT(A1,3))<1000), CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,3),1))+1)," ","Hundred"),"")&" "&IF(AND(VALUE(RIGHT(A1,2))>19,VALUE(RIGHT(A1,2))<100),INDEX({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (VALUE(LEFT(RIGHT(A1,2),1)))),"")&" "&IF(AND(VALUE(RIGHT(A1,2))>9,VALUE(RIGHT(A1,2))<20),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,RIGHT(A1,1)+1),"")&" "&IF(OR(VALUE(RIGHT(A1,2))>20,VALUE(RIGHT(A1,2))<10),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(A1,1)+1),"")))))&" "&"Only")




Alternatively you can copy and paste the following code by:


Cut and paste the code into google <> Script editor and run it by  pressing keyboard keys - Ctrl+Alt+Shift+2






/** @OnlyCurrentDoc */

function N2W() {
  var spreadsheet = SpreadsheetApp.getActive();
  spreadsheet.getRange('B1').activate();
  spreadsheet.getCurrentCell().setFormula('="Ringgit Malaysia :"&" "&(TRIM(IF(OR((value(left(A1,(len(A1)-3))))>999999,(value(left(A1,(len(A1)-3))))<1),"This version is limited to 6 digit to the left of a decimal or dot and rounded to two decimal places",(IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),6))>99999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),6))<1000000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),1))+1)&" "&"Hundred"&" "&IF(VALUE(INDEX({"100000","200000","300000","400000","500000","600000","700000","800000","900000"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),1))))/1000=VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),6),3)),"Thousand",""),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>19999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<100000),INDEX({"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),1)-1)),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>19999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<100000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),2),1)+1)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>9999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<20000),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),5),2))-9)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))>999,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),5))<10000),CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),4),1))+1)," ","Thousand"),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),3))>99, VALUE(RIGHT((value(left(A1,(len(A1)-3)))),3))<1000), CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),3),1))+1)," ","Hundred"),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>19,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<100),INDEX({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (VALUE(LEFT(RIGHT((value(left(A1,(len(A1)-3)))),2),1)))),"")&" "&IF(AND(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>9,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<20),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,RIGHT((value(left(A1,(len(A1)-3)))),1)+1),"")&" "&IF(OR(VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))>20,VALUE(RIGHT((value(left(A1,(len(A1)-3)))),2))<10),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT((value(left(A1,(len(A1)-3)))),1)+1),""))))&" "&"And"&" "&"Sen :"&" "& (TRIM(IF(OR(A1>999999,A1<1),"This version is limited to 6 digit (integer only)",(IF(AND(VALUE(RIGHT(A1,6))>99999,VALUE(RIGHT(A1,6))<1000000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,6),1))+1)&" "&"Hundred"&" "&IF(VALUE(INDEX({"100000","200000","300000","400000","500000","600000","700000","800000","900000"},1,VALUE(LEFT(RIGHT(A1,6),1))))/1000=VALUE(LEFT(RIGHT(A1,6),3)),"Thousand",""),"")&" "&IF(AND(VALUE(RIGHT(A1,5))>19999,VALUE(RIGHT(A1,5))<100000),INDEX({"Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1,VALUE(LEFT(RIGHT(A1,5),1)-1)),"")&" "&IF(AND(VALUE(RIGHT(A1,5))>19999,VALUE(RIGHT(A1,5))<100000),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(LEFT(RIGHT(A1,5),2),1)+1)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT(A1,5))>9999,VALUE(RIGHT(A1,5))<20000),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,VALUE(LEFT(RIGHT(A1,5),2))-9)&" "&"Thousand","")&" "&IF(AND(VALUE(RIGHT(A1,5))>999,VALUE(RIGHT(A1,5))<10000),CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,4),1))+1)," ","Thousand"),"")&" "&IF(AND(VALUE(RIGHT(A1,3))>99, VALUE(RIGHT(A1,3))<1000), CONCATENATE(INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,VALUE(LEFT(RIGHT(A1,3),1))+1)," ","Hundred"),"")&" "&IF(AND(VALUE(RIGHT(A1,2))>19,VALUE(RIGHT(A1,2))<100),INDEX({"","Twenty","Thirty","Fourty","Fifty","Sixty","Seventy","Eighty","Ninety"},1, (VALUE(LEFT(RIGHT(A1,2),1)))),"")&" "&IF(AND(VALUE(RIGHT(A1,2))>9,VALUE(RIGHT(A1,2))<20),INDEX({"Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"},1,RIGHT(A1,1)+1),"")&" "&IF(OR(VALUE(RIGHT(A1,2))>20,VALUE(RIGHT(A1,2))<10),INDEX({"","One","Two","Three","Four","Five","Six","Seven","Eight","Nine"},1,RIGHT(A1,1)+1),"")))))&" "&"Only")');
  spreadsheet.getRange('A1').activate();
  spreadsheet.getCurrentCell().setValue('123');
  spreadsheet.getActiveSheet().setColumnWidth(2, 533);
  spreadsheet.getRange('B1').activate();
  spreadsheet.getActiveRangeList().setWrapStrategy(SpreadsheetApp.WrapStrategy.WRAP)
  .setVerticalAlignment('top');
  spreadsheet.getRange('A1').activate();
  spreadsheet.getActiveRangeList().setVerticalAlignment('top');

};

Sunday, 22 July 2018

Reply to FB posting by Puan Masniah Suhailie



Well, I can’t answer for them Puan Masniah Suhailie.

As far as I am concerned, we should abide by the Malaysia Agreement 1963, Malaysia Act 1963 and the Federal constitution as it was on the day Malaysia was formed..

Over the past 60 years of BN rule, amendment were made to the Federal constitution.

Some of the amendments were said to be in contradiction to MA63 and the Federal constitution itself.

With or without contradiction, all the amendment affecting Sarawak were passed and voted for by Sarawak BN MPs by the majority without abstention.

The questions of whether the amendment were in violation or contradiction to MA63 and the Federal Constitution or not is only for the court to determine.

For instance, the amendment to Article 1(2) of the Federal Constitution made on the 12th & 13th day of August, 1976 was voted for by Sarawak BN MPs by convincing majority.

The passing of the Petroleum Development Act 1974 was moved by our current TYT .

This Act is also said to be in contradiction to Article 112C 4(b) of the federal constitution in that Parliament has no authority to prohibit the levying of royalties on any mineral by the State or to restrict the royalties that may be so levied. That is to say Parliament cannot pass PDA74 that deny Sarawak of its right to charge royalty on any mineral found in its territory.

The signing of “The Sale of Sarawak Petroleum ownership, rights, privileges, powers and liberties in return for cash payment paid by installment in 1975 Agreement” made between Sarawak State Government and Petronas, was made by Sarawak TKM under the then Sarawak Chief Minister Tun Abdul Rahman Yaakub.

We are not sure if it was made as part of the review within the context of Part 47 of the Malaysia Agreement and or 112D of the Federal constitution. That remained a question.

Earlier, the Sarawak Chief Minister Tun abdul Rahman Yaakub signed a vesting order dated 27th day of March 1975, under Section 2(2) of the Petroleum Development Act 1974, to vest the entire Petroleum ownership, rights, privileges, powers and liberties to PETRONAS. The act of vesting the entire Petroleum ownership, rights, priviviges, powers and liberties to PETRONAS is itself denying Sarawak of oil right under 112C 4(b) of the Federal Constitution.

It was also said that the vesting made under section 2(2) of the PDA74 was made before the rate of cash payment (what many Malaysian public, today wrongly refer to as Petroleum Royalty) under section 4 of the Petroleum Development Act 1974 was reached or agreed upon. This is also said to be contractually absurd. In short , one agrees to transfer his land title with the intention of selling before the selling price on the property is fixed or agreed upon.

“The Sale of Sarawak Petroleum ownership, rights, privileges, powers and liberties in return for cash payment paid by installment in 1975 Agreement” also state that, in consideration of the vesting under Sec 2 and Cash Payment in return for ownership of the Petroleum under section 4 of the PDA74, the Sarawak state Government thereby waives any right to royalty or any other payment payable pursuant to any oil mining lease, license or agreement under the land Ordinance of Sarawak or any other written law relating to petroleum for the time being in force in Sarawak.

The waiving of the provisions of the Sarawak laws such the Sarawak Land Code, Oil Mining Ordinance 1958 and the related ones that was in force before the formation Malaysia without the consent of the DUN or without the endorsement of the DUN is said to be in violation of the Federal and state constitution.

The capacity of the signatory to “The Sale of Sarawak Petroleum ownership, rights, privileges, powers and liberties in return for cash payment paid by installment in 1975 Agreement” is questionable.

The rights of Sarawak is protected under the Federal Constitution. Among it are those related to the regulation of the state laws relating to mineral and mining.Item 8(j) of List I (Federal List) and 2(c) of List II (State List) of the Ninth Schedule of the Federal constitution is very clear on the right of the State on the same subject.

The Territorial Sea Act 2012 was passed and later enforced on the 22nd Day of May, 2012, just merely 28 days after the six month period from the date (24 day of November, 2011) PM Najib made the parliamentary announcement to annul or revoke the Emergency Law promulgated on 15th day of May 1969 as well as two other emergency Laws in force in Sarawak. The Territorial Sea Act of 2012 limits the extent of Sarawak’s territorial water from 350 mile to merely 3 miles. The 3 miles is just convenient for “makak bubuk” and shallow fishing. This Territorial Sea Act of 2012, which as supported overwhelmingly by Sarawak BN MPs is also said to be in contradiction to Article 2(b). where Parliament may by law alter the boundaries of any State, BUT THE LAW ALTERING THE BOUNDARIES OF A STATE SHALL NOT BE PASSED WITHOUT THE CONSENT OF THE STATE (expressed by a law made by the Legislature of that State) and of the Conference of Rulers.

Under the present day’s law, Petronas, by virtue of the act and conduct of the past BN government, is the owner of the petroleum resources and as such Petronas, a wholly state (Malaysia) owned corporation will have the say to fix how much “CASH PAYMENT” under section 4 of the PDA74 it is willing to to pay. Sarawak will have to beg for it. It was the past BN government who positioned Sarawak as bagger to the 1974, 1975 petroleum deal.

As beggar how much and what can the Sarawak PH MPs do to revert back the position?

The Sarawak Oil Mining Ordinance 1958 and the administrative practices applied to Sarawak oil & gas was already in place long before the the existence of the PDA74 but it was kept in the dark cupboard for almost 44 years without generating any oil and gas revenues for the state until it was highlighted just recently.

As for the the 20% “Royalty” it is still under the sec 4 of the PDA74. That is CASH PAYMENT in return for Petroleum ownership, rights, privileges, powers and liberties to PETRONAS. It is up to Sarawak state government to decide. PH Sarawak is not the government of the day in Sarawak.




Hansard Parlimen Malaysia - Rang Undang-undang Akta Kemajuan Petroliam pada

17/07/1974
18/07/1974
19/07/1974
17/07/1974
22/07/1974
24/07/1974  (Rang undang-undang Kemajuan Petroliam)
25/07/1974


17/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia










18/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia









19/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia










22/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia










24/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia (Rang undang-undang Kemajuan Petroliam)










25/07/1974 - Hansard / Penyata Rasmi Parlimen Malaysia










Extract of  “The Sale of Sarawak Petroleum ownership, rights, privileges, powers and liberties in return for cash payment paid by installment in 1975 Agreement”
(Contents only)








Vesting  dated 27th day of March 1975, under Section 2(2) of the Petroleum Development Act 1974, to vest the entire Petroleum ownership, rights, privileges, powers and liberties to PETRONAS.










Petroleum Development Act, 1974