ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reference cell in previous worksheet to then add +1 for serial pag (https://www.excelbanter.com/excel-programming/379902-reference-cell-previous-worksheet-then-add-1-serial-pag.html)

Thames

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.

JLGWhiz

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.


John Bundy

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.


Thames

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.


Thames

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.


Hemant_india[_2_]

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.


NickHK

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.





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

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