+ Reply to Thread
Results 1 to 5 of 5

Interpret code

  1. #1
    FIRSTROUNDKO via OfficeKB.com
    Guest

    Interpret code

    HI,

    can somebody please expalin in plain english what this lines of codes do

    Worksheets(SheetNotification).Range("m" & 19).Value = "=IF(RC[-4]<0,RC[-11],
    R6C3)"

    Worksheets(SheetNotification).Range("j" & 19).Value = "=RC[1]/RC[-1]"

    Thanks in Advance

    Darren

    --
    Message posted via OfficeKB.com
    http://www.officekb.com/Uwe/Forums.a...mming/200603/1

  2. #2
    Gary Keramidas
    Guest

    Re: Interpret code

    it's using M19 as the reference
    so RC[-4] moves 4 columns to the left, which makes it I19
    the RC[-11] moves 11 columns to the left which makes it B19
    the R6C3 means column 3, row 6 or C6

    =IF(I19<0,B19,$C$6)

    --


    Gary


    "FIRSTROUNDKO via OfficeKB.com" <u15639@uwe> wrote in message
    news:5da5050029689@uwe...
    > HI,
    >
    > can somebody please expalin in plain english what this lines of codes do
    >
    > Worksheets(SheetNotification).Range("m" & 19).Value = "=IF(RC[-4]<0,RC[-11],
    > R6C3)"
    >
    > Worksheets(SheetNotification).Range("j" & 19).Value = "=RC[1]/RC[-1]"
    >
    > Thanks in Advance
    >
    > Darren
    >
    > --
    > Message posted via OfficeKB.com
    > http://www.officekb.com/Uwe/Forums.a...mming/200603/1




  3. #3
    Toppers
    Guest

    RE: Interpret code

    R1C1 format as used below:

    RC[-4] means the column 4 to the left of the cell M19 = I19
    RC[-11] means the column 11 to the left of cell M19 = B19

    The above are relative addresses i.e. offsets from M19 in this case


    R6C3 means row 6 column 3 i.e C6 and is an absolute address ($C$6)

    so M19 contains:

    =IF(I19<0,B19,$C$6)

    RC[1] means 1 column to the right of J19 i.e K19
    RC[-1] means 1 column to the left i.e I19

    So J19 contains:

    =K19/I19

    HTH

    "FIRSTROUNDKO via OfficeKB.com" wrote:

    > HI,
    >
    > can somebody please expalin in plain english what this lines of codes do
    >
    > Worksheets(SheetNotification).Range("m" & 19).Value = "=IF(RC[-4]<0,RC[-11],
    > R6C3)"
    >
    > Worksheets(SheetNotification).Range("j" & 19).Value = "=RC[1]/RC[-1]"
    >
    > Thanks in Advance
    >
    > Darren
    >
    > --
    > Message posted via OfficeKB.com
    > http://www.officekb.com/Uwe/Forums.a...mming/200603/1
    >


  4. #4
    Jerry W. Lewis
    Guest

    RE: Interpret code

    The easiest way to find out is to just run it

    The first line puts the formula =K19/I19 into cell J19

    The second line puts the formula =IF(I19<0,B19,$C$6) into cell M19

    The sheet where these cells are located is given by the VBA variable
    SheetNotification that must be defined somewhere.

    Range("m" & 19) instead of Range("m19") looks strange, but does work.

    Jerry

    "FIRSTROUNDKO via OfficeKB.com" wrote:

    > HI,
    >
    > can somebody please expalin in plain english what this lines of codes do
    >
    > Worksheets(SheetNotification).Range("m" & 19).Value = "=IF(RC[-4]<0,RC[-11],
    > R6C3)"
    >
    > Worksheets(SheetNotification).Range("j" & 19).Value = "=RC[1]/RC[-1]"
    >
    > Thanks in Advance
    >
    > Darren
    >
    > --
    > Message posted via OfficeKB.com
    > http://www.officekb.com/Uwe/Forums.a...mming/200603/1
    >


  5. #5
    FIRSTROUNDKO via OfficeKB.com
    Guest

    Re: Interpret code

    Gary,

    Thanks

    Darren

    Gary Keramidas wrote:
    >it's using M19 as the reference
    >so RC[-4] moves 4 columns to the left, which makes it I19
    >the RC[-11] moves 11 columns to the left which makes it B19
    >the R6C3 means column 3, row 6 or C6
    >
    >=IF(I19<0,B19,$C$6)
    >
    >> HI,
    >>

    >[quoted text clipped - 8 lines]
    >>
    >> Darren


    --
    Message posted via http://www.officekb.com

+ 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