Warning: include_once(/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/wp-cache-phase1.php): failed to open stream: No such file or directory in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/advanced-cache.php on line 22

Warning: include_once(): Failed opening '/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/wp-cache-phase1.php' for inclusion (include_path='.:/opt/php74') in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/advanced-cache.php on line 22

Warning: Cannot modify header information - headers already sent by (output started at /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/advanced-cache.php:22) in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-editormd/src/Main.php on line 113

Warning: include(/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-super-cache/wp-cache.php on line 115

Warning: include(): Failed opening '/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/opt/php74') in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-super-cache/wp-cache.php on line 115

Warning: include_once(/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-super-cache/wp-cache.php on line 138

Warning: include_once(): Failed opening '/var/www/nurkholis/data/www/nurkholis.web.id/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/opt/php74') in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-super-cache/wp-cache.php on line 138

Warning: Cannot modify header information - headers already sent by (output started at /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/advanced-cache.php:22) in /var/www/nurkholis/data/www/nurkholis.web.id/wp/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 1539
Change Case Font pada Excel dengan Macro | Catatan Nurkholis

Change Case Font pada Excel dengan Macro

Kita tentu sudah mengenal rumus UPPER, LOWER, dan PROPPER. Ketiga rumus tersebut digunakan untuk mengganti Bentuk Huruf kapital / kecil. Hanya saja, aplikasinya harus dilakukan di cell kosong lainnya. Misal di Cell A1 berisi “apel”, maka untuk mengubahnya menjadi “APEL”, kita harus menggunakan rumus =UPPER(A1) di B1 (misalnya), kemudian kita kopi dan paste value di A1.

Namun jangan khawatir, berkat bantuan Macro Excel, maka kita bisa mengganti
Case pada Cell Excel layaknya mengganti Case pada Ms Word. Caranya, masukkan macro berikut:

Sub GantiCase()

'Mengganti bentuk Case pada Range yang dipilih.
'Shortcut yang digunakan adalah "Ctrl q"
   Application.OnKey "^q", "GantiCase"

   Dim Rng As Range
    
   For Each Rng In Selection
     Select Case Rng.Value
     Case StrConv(Rng.Value, 1)
       Rng.Value = StrConv(Rng.Value, 2)
     Case StrConv(Rng.Value, 2)
       Rng.Value = StrConv(Rng.Value, 3)
     Case StrConv(Rng.Value, 3)
       Rng.Value = StrConv(Rng.Value, 1)
     Case Else
       Rng.Value = StrConv(Rng.Value, 1)
     End Select
  Next Rng

End Sub

Dengan menggunakan shortcut “Ctrl Q”, maka anda bisa mengubah Case layaknya Ms. Word.
Jika ingin shortcutnya juga diganti layaknya pada microsoft word, maka kode berikut:
Application.OnKey “^q”, “GantiCase”
bisa diganti dengan
Application.OnKey “+{F3}”, “GantiCase”

Contoh filenya bisa diunduh di sini:

Tinggalkan komentar

%d blogger menyukai ini: