Hello,
The replaceVariableByText method only replaces placeholders, but it doesn't allow setting new styles. A method that need to be developed will support this task.
Regarding the other question, there's no direct method to find the cell position of a specific content. But you can use getCellPositions to return all cell positions in the active sheet and then iterate the array returned by this method with getCell to get that information. getCell returns an array with the following information:
* @return array|null
* 'function' (string)
* 'sharedString' (string)
* 'type' (string)
* 'value' (string)
Regards.