Participate in Codex, Test Your Skills & Win BIG

Excel Column Number

Problem Description

Given a column title A as appears in an Excel sheet, return its corresponding column number.

Problem Constraints

1 <= |A| <= 100

Input Format

First and only argument is string A.

Output Format

Return an integer

Example Input

Input 1:


Input 2:


Example Output

Output 1:


Output 2:


Example Explanation

Explanation 1:

 1 -> "A"

Explanation 2:

A  -> 1
B -> 2
C -> 3
Z -> 26
AA -> 27
AB -> 28 

NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Excel Column Number on Interview Code Editor
  • Hint 1
  • Solution Approach
  • Complete Solution
Asked In:


Click here to start solving coding interview questions