4 Replies Latest reply on Oct 31, 2018 6:35 AM by Jim Dehner

calculated field that groups on first character (number or letter)

Hi guys,

at my company we use certain codes, most codes contain only 5 numbers (12345), but there are some cases where the code starts with a letter, with 4 numbers (H1234).

I would like to group these 2 options, so if it starts with a letter, then group as 'code with a letter' (or something like that).

I do need seem to get the solution to do this...

I do not want to say in my formula that if it starts with a A or a B or a C, then it will be grouped, but I want to identify it as a letter.

Sander

• 1. Re: calculated field that groups on first character (number or letter)

Hi

try this          if  ASCII( left([Code],1))>=65 then "Letter" else "Number" end

Ascii codes for letters start at 65 - numbers are 0-9

Jim

If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

1 of 1 people found this helpful
• 2. Re: calculated field that groups on first character (number or letter)

HI Sander,

Could you please attach a sample data so that it would be helpful to solve the problem.

BR,

NB

• 3. Re: calculated field that groups on first character (number or letter)

Hi Jim,

I think this is the solution I was looking for!

Thank you very much!