Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default Loop for formula on one sheet with reference from another sheet

I have a form in XL that currently prints automatically with a macro when I
enter a project number. The list of project numbers is on another sheet in
the workbook. The sheet I am working on is "Close Form" cell
'Range("D2:E2").Select' because it's a merged cell. I would like to have a
macro that writes something like "='Upload Nos'!A1" in this merged cell
looping through col A until the first blank cell in the sheet, "Upload Nos".
I don't have enough macro experience to write it. Can anyone help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Loop for formula on one sheet with reference from another sheet

Valerie,

Sub ValPrint()
For i = 1 To Worksheets("Upload Nos").Cells(Rows.Count,1).End(xlUp).Row
Worksheets("Close Form").Cells(2,4).Value = _
Worksheets("Upload Nos").Cells(i,1).Value
Application.Calculate
Worksheets("Close Form").PrintOut
Next i
End Sub

HTH,
Bernie
MS Excel MVP


"Valerie" wrote in message
...
I have a form in XL that currently prints automatically with a macro when I
enter a project number. The list of project numbers is on another sheet in
the workbook. The sheet I am working on is "Close Form" cell
'Range("D2:E2").Select' because it's a merged cell. I would like to have a
macro that writes something like "='Upload Nos'!A1" in this merged cell
looping through col A until the first blank cell in the sheet, "Upload Nos".
I don't have enough macro experience to write it. Can anyone help?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sheet Reference in Formula JB Bates[_2_] Excel Discussion (Misc queries) 0 October 16th 09 09:21 PM
Loop through sheets & filter main sheet using sheet name Les Excel Programming 4 May 20th 08 02:39 PM
Reference a Sheet in Formula Carlee Excel Worksheet Functions 3 April 14th 07 10:49 AM
Formula in a sheet reference KimC Excel Worksheet Functions 4 March 28th 07 02:53 AM
Formula to reference name of sheet tab DBCollier Excel Discussion (Misc queries) 7 April 3rd 06 10:08 PM


All times are GMT +1. The time now is 07:08 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"