+ Reply to Thread
Results 1 to 71 of 71

Cell Reference help required

  1. #1
    Registered User
    Join Date
    08-04-2005
    Posts
    7

    Exclamation Cell Reference help required

    Hello All,

    I have a problem with Cell reference between spreadsheets. Help would be highly appreciated.

    Here is what I need.

    I have 30 different spreadsheets in a workbook. Worksheet names (Aug01, Aug02, Aug 03….Aug30). All the sheets are similar. I need to refer the totals of the previous worksheet in the current one.

    Example:

    D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)
    .
    .
    .
    .
    .
    D5 of sheet Aug02 to D4 of sheet Aug01, ('Aug01'!D5)


    All the sheets are chain linked like this till the first sheet (Aug01). I could do this manually, how ever any revisions to the format, I have to redo all the links again. I am looking for a formula instead of “('Aug29'!D5)” to be able to link the previous sheet.

    Hope I explained it clear. I am not a tech preson and I am not sure I am clear. Please ask me if I am not clear.

    Please let me know if there is some thing that helps me with this.
    Thanks
    Raja

  2. #2
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  3. #3
    Registered User
    Join Date
    08-04-2005
    Posts
    7
    Dear Mangesh,

    Thanks a lot for the code. I am a dummie ..so please explain me on where and how to run the code.

    I am using MS office 2000

    Raja

    [QUOTE=Mangesh Yadav]Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh

  4. #4
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  5. #5
    Forum Contributor
    Join Date
    02-19-2005
    Location
    Gurgaon,India
    MS-Off Ver
    2007,2010,2013
    Posts
    180
    Hi,

    I think Bob's formula can be shortened to like this,

    =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))

    where x,

    =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)

    HTH
    Kris

  6. #6
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  7. #7
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  8. #8
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  9. #9
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  10. #10
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  11. #11
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  12. #12
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  13. #13
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  14. #14
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  15. #15
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  16. #16
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  17. #17
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  18. #18
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  19. #19
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  20. #20
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  21. #21
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  22. #22
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  23. #23
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  24. #24
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  25. #25
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  26. #26
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  27. #27
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  28. #28
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  29. #29
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  30. #30
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  31. #31
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  32. #32
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  33. #33
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  34. #34
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  35. #35
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  36. #36
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  37. #37
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  38. #38
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  39. #39
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  40. #40
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  41. #41
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  42. #42
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  43. #43
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  44. #44
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  45. #45
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  46. #46
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  47. #47
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  48. #48
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  49. #49
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  50. #50
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  51. #51
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  52. #52
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  53. #53
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  54. #54
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  55. #55
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  56. #56
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  57. #57
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  58. #58
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  59. #59
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  60. #60
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  61. #61
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  62. #62
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  63. #63
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  64. #64
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  65. #65
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  66. #66
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  67. #67
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  68. #68
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Yeah but assumes Aug. Mine will work with Aug, Sep, etc, which I am sure is
    what the OP would want. Put that back in and it is no shorter.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Krishnakumar" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Hi,
    >
    > I think Bob's formula can be shortened to like this,
    >
    > =IF(RIGHT(x,2)="01","",INDIRECT("Aug"&TEXT(--RIGHT(x,2)-1,"00")&"!D5"))
    >
    > where x,
    >
    > =MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)
    >
    > HTH
    >
    >
    > --
    > Krishnakumar
    >
    >
    > ------------------------------------------------------------------------
    > Krishnakumar's Profile:

    http://www.excelforum.com/member.php...o&userid=20138
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  69. #69
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    If you have not used Bob's formula as yet, then to use my code, simply press
    Alt F11 in excel. This opens the VBE. Go to Insert, and insert a new module.
    Place the code here. And click on the right-pointed triangle to run it.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Dear Mangesh,
    >
    > Thanks a lot for the code. I am a dummie ..so please explain me on
    > where and how to run the code.
    >
    > I am using MS office 2000
    >
    > Raja
    >
    > Mangesh Yadav Wrote:
    > > Run this VBA code
    > >
    > > Sub RunThis()
    > >
    > > ReDim ShtNames(0 To Worksheets.Count - 1)
    > > i = 0
    > > For Each sht In Worksheets
    > > ShtNames(i) = sht.Name
    > > i = i + 1
    > > Next
    > >
    > > For j = 1 To UBound(ShtNames)
    > > Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    > > Next
    > >
    > > End Sub
    > >
    > > This will do the following:
    > > In Aug2 sheet cell D5, it will put =Aug1!D4
    > > and so on.
    > >
    > > Mangesh

    >
    >
    > --
    > Raja
    >
    >
    > ------------------------------------------------------------------------
    > Raja's Profile:

    http://www.excelforum.com/member.php...o&userid=25901
    > View this thread: http://www.excelforum.com/showthread...hreadid=393232
    >




  70. #70
    Bob Phillips
    Guest

    Re: Cell Reference help required

    Nice simple solution :-)

    =IF(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255),2)<>"
    01",INDIRECT("'"&LEFT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+
    1,255),LEN(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255))-2)&
    TEXT(VALUE(RIGHT(MID(CELL("Filename",A1),FIND("]",CELL("Filename",A1))+1,255
    ),2))-1,"00")&"'!D5"),"")

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




  71. #71
    Mangesh Yadav
    Guest

    Re: Cell Reference help required

    Run this VBA code

    Sub RunThis()

    ReDim ShtNames(0 To Worksheets.Count - 1)
    i = 0
    For Each sht In Worksheets
    ShtNames(i) = sht.Name
    i = i + 1
    Next

    For j = 1 To UBound(ShtNames)
    Worksheets(ShtNames(j)).Range("D5") = "=" & ShtNames(j - 1) & "!D4"
    Next

    End Sub

    This will do the following:
    In Aug2 sheet cell D5, it will put =Aug1!D4
    and so on.

    Mangesh



    "Raja" <[email protected]> wrote in message
    news:[email protected]...
    >
    > Hello All,
    >
    > I have a problem with Cell reference between spreadsheets. Help would
    > be highly appreciated.
    >
    > Here is what I need.
    >
    > I have 30 different spreadsheets in a workbook. Worksheet names (Aug01,
    > Aug02, Aug 03..Aug30). All the sheets are similar. I need to refer the
    > totals of the previous worksheet in the current one.
    >
    > Example:
    >
    > D5 of sheet Aug30 to D4 of sheet Aug29, ('Aug29'!D5)
    > D5 of sheet Aug29 to D4 of sheet Aug28, ('Aug28'!D5)




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1