ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Interpret code (https://www.excelbanter.com/excel-programming/356822-interpret-code.html)

FIRSTROUNDKO via OfficeKB.com

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

Gary Keramidas

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




Toppers

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


Jerry W. Lewis

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


FIRSTROUNDKO via OfficeKB.com

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


All times are GMT +1. The time now is 02:22 PM.

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