• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

How to convert SBCS to DBCS?|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / How to convert SBCS to DBCS?|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…How to convert SBCS to DBCS?
sp_PrintTopic sp_TopicIcon
How to convert SBCS to DBCS?
Avatar
julian
Member
Members
Level 0
Forum Posts: 81
Member Since:
December 12, 2016
sp_UserOfflineSmall Offline
1
May 6, 2018 - 11:44 pm
sp_Permalink sp_Print

TRIM function has no way to covert Double byte character set (DBCS) to Single byte character set (SBCS). Therefore I used MID / LEN functions to remove the first and the last spaces of target DBCS and converted it SBCS smoothly. However, is it any workaround to convert SBCS to DBCS by using Excel functions? I tried to add a pair of leading and trailing spaces on the SBCS but failed.

sp_AnswersTopicSeeAnswer See Answer
Avatar
Frans Visser
Duivendrecht (near Amsterdam) - The Netherlands

VIP
Members
Level 2
Forum Posts: 346
Member Since:
April 21, 2015
sp_UserOfflineSmall Offline
2
May 7, 2018 - 12:34 am
sp_Permalink sp_Print

Interesting case Julian. Do you have some examples on how you did it? I'm not familiar with DBCS and SBCS so have to guess what this is all about, but maybe can help you when I see what it is and how it's working.

Frans

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
3
May 7, 2018 - 11:50 am
sp_Permalink sp_Print

Hi Julian,

ASC converts DBCS so SBCS

DBCS converts SBCS to DBCS.

Cheers

Phil

Avatar
julian
Member
Members
Level 0
Forum Posts: 81
Member Since:
December 12, 2016
sp_UserOfflineSmall Offline
4
May 10, 2018 - 8:15 am
sp_Permalink sp_Print

Frans,

I simply used the following formula to remove the first and the last characters of a DBCS string in cell A1

  MID(A1,2,LEN(A1)-2)

 

Phil,

I used my Excel 2013 and checked the character length after ASC converting but found the same number as original DBCS string. It's supposed to have a gap of 2, right? Furthermore, Excel 2013 does not support DBCS function. Do I have other options? 

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
5
May 10, 2018 - 10:02 am
sp_Permalink sp_Print sp_EditHistory

Hi Julian,

DBCS is supported in Excel 2013, it says so at the top of the function description, and I've used it in my own Excel 2013.

The number of characters in a string is not related to whether that string is DBCS or SBCS.  The difference between DBCS and SBCS is the number of bytes the computer uses to represent the character : 1 for Single Byte CS, 2 for Double Byte CS.

So if I have a DBCS string "MOTH" it is 4 characters and LEN("MOTH") will give an answer of 4.  But it uses 8 bytes of memory to store the string.

If we use SBCS and the string is "MOTH" the length of the string is also 4, and only uses 4 bytes of memory for storage.

Using string functions like TRIM and MID have no effect on the underlying character set used to represent the string.

Reference

Double-Byte Character Sets

Single-Byte Character Sets

Cheers

Phil

Avatar
julian
Member
Members
Level 0
Forum Posts: 81
Member Since:
December 12, 2016
sp_UserOfflineSmall Offline
6
May 10, 2018 - 11:48 am
sp_Permalink sp_Print

Hi Philip,

Is it possible to type the string "MONTH" using DBCS and SBCS respectively in Excel? If this is the case then LOOKUP or MATCH function can find the corresponding strings as a result? 

Regards,

Julian

Avatar
Philip Treacy
Admin
Level 10
Forum Posts: 1518
Member Since:
October 5, 2010
sp_UserOfflineSmall Offline
7
May 10, 2018 - 4:41 pm
sp_Permalink sp_Print

Hi Julian,

Yes, whether "MONTH" is stored as a double-byte or single-byte character, it still only has 5 characters in the string.

Regards

Phil

sp_AnswersTopicAnswer
Answers Post
sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Kim Knox, Bhuwan Devkota
Guest(s) 9
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 871
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
Jessica Stewart: 204
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Bhuwan Devkota
Kathryn Patton
Maria Conatser
Jefferson Granemann
Glen Coulthard
Nikki Fox
Rachele Dickie
Raj Mattoo
Mark Luke
terimeri dooriyan
Forum Stats:
Groups: 3
Forums: 24
Topics: 6221
Posts: 27285

 

Member Stats:
Guest Posters: 49
Members: 31909
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.