Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial pag
I want to print a serial number on previously printed gift cards. The gift
cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial pag
Using the Cells method in VBA:
Cells(1+1,1) moves one row down. Cells(1,1+1) moves one column to the right Cells(2-1,1) moves one row up. Cells( 2,2-1) moves one column to the left. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial pag
You sure can, without knowing the cell or its contents, i can't be exact but
if the last cell is on sheet1 column A cell 10 then wherever you want the answer: =Sheet1!A10+1 change Sheet1! to the sheets name and A10 to the cell that its in. -- -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial
I am trying to find if there is a value/function that references a cell on a previous worksheet. In other words, if assuming there is a value (say 232)in Worksheet 1, Cell F23, that I wish to appear in Worksheet 2 as the value 233, I know how to program WORKSHEET1!F23+1, but if I wanted to copy that formula across a 50 sheet workbook, do I need to type in each Worksheet# on each page, or is there a value that equals a reference to the previous worksheet, i.e: (PreviousWorkSheet#!F23+1) "JLGWhiz" wrote: Using the Cells method in VBA: Cells(1+1,1) moves one row down. Cells(1,1+1) moves one column to the right Cells(2-1,1) moves one row up. Cells( 2,2-1) moves one column to the left. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial
Thank you for your response. I do understand what you are saying. Pasted
below is my response to another reply: I am trying to find if there is a value/function that references a cell on a previous worksheet. In other words, if assuming there is a value (say 232)in Worksheet 1, Cell F23, that I wish to appear in Worksheet 2 as the value 233, I know how to program WORKSHEET1!F23+1, but if I wanted to copy that formula across a 50 sheet workbook, do I need to type in each Worksheet# on each page, or is there a value that equals a reference to the previous worksheet, i.e: (PreviousWorkSheet#!F23+1) "John Bundy" wrote: You sure can, without knowing the cell or its contents, i can't be exact but if the last cell is on sheet1 column A cell 10 then wherever you want the answer: =Sheet1!A10+1 change Sheet1! to the sheets name and A10 to the cell that its in. -- -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial
thames
write a small routine something like this sub x() dim asheet ,bsheet dim x x= thisworkbook.worksheets.count for n= 1 to x worksheet(n).activate 'your print command here asheet= worksheet(n).range(f,10) =====change next n the code is not complete but u will get an idea -- hemu "Thames" wrote: Thank you for your response. I do understand what you are saying. Pasted below is my response to another reply: I am trying to find if there is a value/function that references a cell on a previous worksheet. In other words, if assuming there is a value (say 232)in Worksheet 1, Cell F23, that I wish to appear in Worksheet 2 as the value 233, I know how to program WORKSHEET1!F23+1, but if I wanted to copy that formula across a 50 sheet workbook, do I need to type in each Worksheet# on each page, or is there a value that equals a reference to the previous worksheet, i.e: (PreviousWorkSheet#!F23+1) "John Bundy" wrote: You sure can, without knowing the cell or its contents, i can't be exact but if the last cell is on sheet1 column A cell 10 then wherever you want the answer: =Sheet1!A10+1 change Sheet1! to the sheets name and A10 to the cell that its in. -- -John Northwest11 Please rate when your question is answered to help us and others know what is helpful. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Reference cell in previous worksheet to then add +1 for serial
Try this UDF, in a module.
Then you can enter =GetThisCellOnPrevWS in any cell. Public Function GetThisCellOnPrevWS() As Variant Dim ThisWSIndex As Long Application.Volatile ThisWSIndex = Application.Caller.Parent.Index If ThisWSIndex 1 Then GetThisCellOnPrevWS = Worksheets(ThisWSIndex - 1).Range(Application.Caller.Address) Else GetThisCellOnPrevWS = "First WS" End If End Function NickHK "Thames" wrote in message ... I am trying to find if there is a value/function that references a cell on a previous worksheet. In other words, if assuming there is a value (say 232)in Worksheet 1, Cell F23, that I wish to appear in Worksheet 2 as the value 233, I know how to program WORKSHEET1!F23+1, but if I wanted to copy that formula across a 50 sheet workbook, do I need to type in each Worksheet# on each page, or is there a value that equals a reference to the previous worksheet, i.e: (PreviousWorkSheet#!F23+1) "JLGWhiz" wrote: Using the Cells method in VBA: Cells(1+1,1) moves one row down. Cells(1,1+1) moves one column to the right Cells(2-1,1) moves one row up. Cells( 2,2-1) moves one column to the left. "Thames" wrote: I want to print a serial number on previously printed gift cards. The gift cards are printed 2-up on 8.5x11 stock. I thought I could create a 50 sheet workbook and print 100 cards at a time by printing the workbook, using my card stock in my printer tray. Am wondering if there is a way to reference the cell in the preceeding worksheet, then add a +1 value. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I reference a cell on a previous worksheet | Excel Discussion (Misc queries) | |||
formula to reference cell on previous worksheet | Excel Worksheet Functions | |||
reference cell from previous worksheet without "naming" worksheet | Excel Worksheet Functions | |||
need formula to reference a cell in previous worksheet | Excel Worksheet Functions | |||
reference to previous worksheet | Excel Programming |