If you want a quick way to write same text in same cell position then this article is for you. In this article, we will learn how to loop through in all the worksheets & add similar text in same position.
Question): I have 3 sheets in a workbook & I want a macro to enter text in all the sheets in cell A1.
We need to follow the below steps:
- Click on Developer tab
- From Code group, select Visual Basic
Enter the following code in the standard module.
For Each Worksheet InThisWorkbook.Sheets
Range(“A1″) = “Exceltip”
In this way, in cell A1, we can write what we want, using VBA in order to save our time.
In case you want a non VBA solution then the similar task can be achieved by using Grouping in Excel.
- We need to hold the CTRL key & then select Sheet1, Sheet2 &Sheet3
- This way we will be able to create temporarily groups all the worksheets.
- Click in cell A1 in any Sheet and then type your text
In this way, this data will appear in each sheet.