將十進位數轉換為十六進位數。
如果函數不可用,並傳回錯誤值#NAME?,請安裝並載入「分析工具庫」載入巨集。
操作方法 :
1.在「工具」選單上,按一下「載入巨集」。
2.在「可用載入巨集」清單中,選取「分析工具庫」框,再按一下「確定」。
3.如果必要,請遵循安裝程序中的指示。
文法
DEC2HEX(number,places)
Number: 待轉換的十進位數。如果參數 number 是負數,則省略 places。 函數 DEC2HEX 傳回 10 位元十六進位
數(40 位元二進位數),最高位元為符號位,其餘 39 位元為數位。負數用二進制數的補碼表示。
Places :所要使用的字元數,如果省略 places,函數 DEC2HEX 用能表示此數的最少字元來表示。當需要在返回
的數值前置零時 places 尤其有用。
說明
一致如果number<-549、755、813、888 或number >549、755、813、887,
則函數 DEC2HEX 傳回錯誤值 #NUM!。
一致如果參數 number 為非數值型,函數 DEC2HEX 會傳回錯誤值 #VALUE!。
一致如果函數 DEC2HEX 需要比 places 指定的更多的位數,將傳回錯誤值 #NUM!。
一致如果 places 不是整數,將截尾取整。
一致如果 places 為非數值型,函數 DEC2HEX 將傳回錯誤值 #VALUE!。
一致如果 places 為負值,函數 DEC2HEX 將傳回錯誤值 #NUM!。
生活和工作中我們為了方便計算統計,常常將不同進制的數值轉換成同一進制。
那麼如何快速將十進位數數值轉換成十六進位呢?
此處涉及DEC2HEX函數。
一致開啟WPS 2019 EXCEL表格,我們要將此十進制數值全部轉換成十六進制,且字元數為5位。
將遊標放在(C4)處,點選插入函數-工程-DEC2HEX函數。
此時彈出對話框,共兩個參數:
「十進位數」是需要轉換的十進位數;
「字元數」是指轉換成十六進位數的字元數。
◆在「十進位數」中輸入(B4),在「字元數」中輸入5。
意思是將此十進位數轉換成十六進位數且字元數為5位元。
點選確定,就可以得到轉換結果。
將遊標放在(C4)右下角,成+字形下拉填充公式,就可以將所有的十進制數轉換成十六進制數了。
评论列表(196条)
测试