How to Loop Through Each Worksheet & Write Text in Same Cells in Microsoft Excel

 

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

image 2

 

Enter the following code in the standard module.

 

Sub mycode()

For Each Worksheet InThisWorkbook.Sheets

Range(“A1″) = “Exceltip”

Next

End Sub

image 1

 

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.

download

Excel

 



Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>