@frswataru
Revisions
Report this question
Subscribe question
Help us understand the problem. What is going on with this question?
Q&A
Closed

Excel VBA 丸数字 整数置換え

Q&A
Closed

解決したいこと

Excel VBA 丸数字 整数変換

ExcelBookの中に複数のシートがあり
セルB10に丸数字(例.①)が入力されいるため
全てのシートのセルB10の丸数字を整数(例.1)に置き換えたいです

0
1
Answer
Report this answer
[B10] = Chr(Asc(Cells(10, 2).Value) + 31473)

これをsheetごとにループすれば丸数字を数字に直すことができると思います。文字コードを取得して定数を引き、再び文字に変換しています。

セルのはじめに”例."というプレフィックスが固定でついているのであれば、VbaのSplit関数を用いて"."で分割し、返り値の第二要素を取得することで丸数字のみを取り出すことができると思います

1
Help us understand the problem. What is going on with this answer?
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした