The plan-view TEM analysis has been used for 3D NAND flash memory to analyze metrology and chemical of channel holes. Focused Ion Beam (FIB) is one of the most powerful techniques for precise location sampling in nanometer-scale for Transmission Electron Microscope (TEM) sample preparation. As semiconductor technology improves continuously, 3D NAND is requiring higher stacks to increasing the capacity of storage. In general, an operator counts the cell layer manually to reach the desire layer on TEM sample before thinning. It is not easy way to make TEM samples at the exact desired layer. To make it easier, automatic cell layer counting workflow is introduced in this paper. This progress is carried out until the desired target cell is reached. Furthermore, marking is performed on the target cell layer. This automation recipe is able to offer simple process to count the desired cell layer without manual action and make TEM sample preparation easily.