ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Entering Data on each Sheet in Workbook (https://www.excelbanter.com/excel-programming/346849-entering-data-each-sheet-workbook.html)

STEVEB

Entering Data on each Sheet in Workbook
 

Hi All,

Does anyone have any suggestions for entering the text "Total" in Cell
A3 and "current" in Cell B4 on on each sheet in a workbook?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111


ben

Entering Data on each Sheet in Workbook
 
sub TotalSum()
dim wks as worksheet
for each wks in thisworkbook.worksheets
wks.range("A3") = "Total"
wks.range("B4") = "current"
next
end sub



--
When you lose your mind, you free your life.


"STEVEB" wrote:


Hi All,

Does anyone have any suggestions for entering the text "Total" in Cell
A3 and "current" in Cell B4 on on each sheet in a workbook?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111



Norman Jones

Entering Data on each Sheet in Workbook
 
Hi Steve,

Try:

'===========
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet

Set WB = ActiveWorkbook '<<==== CHANGE

For Each SH In WB.Worksheets
SH.Range("A3").Value = "Total"
SH.Range("B4").Value = "current"
Next SH

End Sub
'<<===========

---
Regards,
Norman


"STEVEB" wrote in
message ...

Hi All,

Does anyone have any suggestions for entering the text "Total" in Cell
A3 and "current" in Cell B4 on on each sheet in a workbook?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:
http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111




Brian

Entering Data on each Sheet in Workbook
 
Dim xSheet as worksheet
For Each xSheet in Thisworkbook
xSheet.range("A3").value="Total"
xSheet.range("C4").value="Current"
Next

or something similar....


"STEVEB" wrote in
message ...

Hi All,

Does anyone have any suggestions for entering the text "Total" in Cell
A3 and "current" in Cell B4 on on each sheet in a workbook?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:

http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111




Brian

Entering Data on each Sheet in Workbook
 
Sorry... I forgot

Add ".Sheets" to Thisworkbook

That will work...
Brian


"STEVEB" wrote in
message ...

Hi All,

Does anyone have any suggestions for entering the text "Total" in Cell
A3 and "current" in Cell B4 on on each sheet in a workbook?

Any help would be greatly appreciated!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile:

http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111




STEVEB

Entering Data on each Sheet in Workbook
 

Thanks all!!!

Everything worked great, I appreciate all your help!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489111


John Michl

Entering Data on each Sheet in Workbook
 
Without VBA, simply select all sheets by 1) click on first sheet tab,
2) hold down shift, 3) click on last sheet tab. This will "group" the
sheets. Now what ever you type in a cell in the first sheet will also
be in all of the other sheets in the same cell.

Click any sheet to "ungroup" them.

- John
www.JohnMichl.com



All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com