# Need help with writing a complicated google sheet formula on Glide tables

**URL:** <https://community.glideapps.com/t/need-help-with-writing-a-complicated-google-sheet-formula-on-glide-tables/57918>\
**Category:** Ask for Help\
**Created:** [February 14, 2023, 1:19am UTC](https://community.glideapps.com/t/need-help-with-writing-a-complicated-google-sheet-formula-on-glide-tables/57918 "2023-02-14T01:19:05Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Uzo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/uzo/32/22639_2.png) [@Uzo](https://community.glideapps.com/u/Uzo)\
**Post date:** [February 14, 2023, 5:06pm UTC](https://community.glideapps.com/t/need-help-with-writing-a-complicated-google-sheet-formula-on-glide-tables/57918/11 "2023-02-14T17:06:49Z")

</div>

sure…

```auto
var x = [['A',1],['B',2],['C',3],['D',4],['E',5],['F',6],['G',7],['H',8],['I',9],['J',1],['K',2],['L',3],['M',4],['N',5],['O',6],['P',7],['Q',8],['R',9],['S',1],['T',2],['U',3],['V',4],['W',5],['X',6],['Y',7],['Z',8]];
var text = p1.toUpperCase();
var res=0;
for(var j=0;j<text.length;++j){
for(var i=0;i<x.length;++i){if(text.slice(j,j+1)==x[i][0]){res=res+x[i][1]}}}
return(res)

```

---

_[View the full topic](https://community.glideapps.com/t/need-help-with-writing-a-complicated-google-sheet-formula-on-glide-tables/57918)._
