<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d28182552\x26blogName\x3d:xL-tips\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dSILVER\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://xl-tips.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttp://xl-tips.blogspot.com/\x26vt\x3d7813163582025807768', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>






22 May 2006

Dayname (Non-English Version)

Category: Multiple Formulas
Level: Intermediate

Unfortunately, Ms Excel just support English in date format compared with OpenOffice.org (OOo) Calc. So, you can’t perform the previous tips of Dayname (English Version) if you want to use another language. This weakness makes us more creative to create multiple formulas.

We will take the advantages of CHOOSE and WEEKDAY formulas.

CHOOSE(index_num, value1, value2, ...)
Index_num specifies which value argument is selected. Index_num must be a number between 1 and 29, or a formula or reference to a cell containing a number between 1 and 29.
If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.

WEEKDAY(date, type)
type 1 or omitted return integer 1-7, where 1 for Sunday and 7 for Saturday
type 2 return integer 1-7, where 1 for Monday and 7 for Sunday
type 3 return integer 0-6, where 0 for Monday and 6 for Sunday

This example shows how to get dayname in Bahasa.



Using same case with previous posting, Dayname (English Version), use this formula in cell of C3:
=CHOOSE(WEEKDAY(B3),"Ahad","Senin","Selasa",
"Rabu","Kamis","Jum'at","Sabtu")

0 Comments:

Post a Comment

<< Home