InterviewBit Academy is now Scaler!
Learn Tech Skills from Scratch @ Scaler EDGE

Excel Column Title

Problem Description

Given a positive integer A, return its corresponding column title as appear in an Excel sheet.

Problem Constraints

1 <= A <= 1000000000

Input Format

First and only argument is integer A.

Output Format

Return a string, the answer to the problem.

Example Input

Input 1:

 A = 1

Input 2:

 A = 28

Example Output

Output 1:


Output 2:


Example Explanation

Explanation 1:

 1 -> A

Explanation 2:

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

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 Title on Interview Code Editor
Sign Up
to access hints and editorial solutions for Excel Column Title
Asked In:


Click here to start solving coding interview questions