i need to calculate how many “p” available and need output in k column Result =4
i need to calculate how many “t” available and need output in L column Result =2
i need to calculate how many “y” available and need output in M column Result =2
i need to calculate how many “r” available and need output in N column Result =2

use Read Range to read the data in Datatable and create counter variable for the letters you have to get the count for, initialize then to zero

Loop through datatable keep the variable counter incrementing for the values as you find any letter in the row in loop

If this a sample data you making up to ask the question?
Also, if u want to do it i an excel using macro. Just use =Count(“p”,A1:J1) and ssme for all letters you want the count of.