InterviewBit Academy is now Scaler!
InterviewBit Academy is now Scaler Academy!

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:

 1

Input 2:

 28



Example Output

Output 1:

 "A"

Output 2:

 "AB"



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
Sign Up
to access hints and editorial solutions for Excel Column Number
Asked In:

Discussion


Loading...
Click here to start solving coding interview questions