Get the next column of Column name

Hey everyone,

I get a column position with lookupRange Activity, for example lets say I get “AC6”, I need the next columns name which would be “AD6”, how can I get this value?

I appreciate every help.

image

Asc(“C”) gives us the ASCII code number for the letter C. Add one to that number as you pass it to the Chr function, and it gives you back the next letter.

HI @jntrk

  • You can try Read Cell Activity.
    Store the value in an Output

image

okay for A-Z it will work but how can I make it function for AD to AE or AJ to AK

with following acitvities you get col pos number and can get col name by col position/index:
grafik

getting the colname from eg AB3 we can use Regex
grafik

so the flow cold be like

  • get col name with regex as shown above
  • get col index by get Column Number activity
  • get Col name by Get Column Name col index + 1
  • get new next cell adress:
    grafik

feel free to work different with the Regex parts e.g. using RegexMatch to optimize the flow
grafik

AD → AE → AF → AG etc is only incrementing the second letter. So use substring to get the second letter, then use the code I gave you to increment to the next letter, then use replace to change AD to AE, for example.

If you need it to flip to BA after AZ, then you just have to do that with some if/then logic.