*Offset ([row], [column])*

lets say i => Range B3 => same as i.offset(0,0)
thenif we want to select Range C4 that should be i.offset(1,1) => 1 Row and 1 column from B3

If we want to select A1 ==> i.offset(-2,-1) => 2 Row before and 1 column before B3


*i.Offset(, 2) = i & "|" & i.Offset(, 1)**
*
if i is A2, then that code will same as :
Range("C2") = Range("A1") & "|" & Range("A1")

Please remember, that i in our code is refer to a Range as defined in first line => Dim i as Range
And Range has default property => Value
i.value will same as i
Range("A1").value will same as just Range("A1") without using .value property

*i.Offset(, 2) = i & "|" & i.Offset(, 1)
**i.Offset(, 2)****.Value** = i****.Value** & "|" & i.Offset(, 1)***.Value


**
Pada 25/07/2013 13:15, Prafull Jadhav menulis:
Dear Sir,

It working fine ...

i.Offset(, 2) = i & "|" & i.Offset(, 1)

Regards,
Prafull

Please can you explain me below line in details .


On Thu, Jul 25, 2013 at 11:34 AM, De Premor <d...@premor.net <mailto:d...@premor.net>> wrote:

    Sub a()
        Dim i As Range
        For Each i In Range("A2:A" & Sheet1.UsedRange.Rows.Count)
            i.Offset(, 2) = i & "|" & i.Offset(, 1)
        Next
    End Sub

    Pada 25/07/2013 12:33, Prafull Jadhav menulis:



    Dear Experts,

    below are code for concatenate of A& B column until A column is
    blank..But I want to run the macro continue till A column is Not
    blank ..for above example row number 7 and 8 not concatenate .
    macro is stuck till row number 5 .

    Sub Concatenate_()
    'combine two cell contain into one cell

    Range("C2").Select

    Do Until Selection.Offset(0, -2).Value = ""

    Selection.Value = Selection.Offset(0, -2) & "|" &
    Selection.Offset(0, -1)

    Selection.Offset(1, 0).Select

    Loop

    End Sub



    Please do the needful.

    Reg,
    Prafull jadhav.
-- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna
    be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of
    this forum @ https://www.facebook.com/discussexcel

    FORUM RULES

    1) Use concise, accurate thread titles. Poor thread titles, like
    Please Help, Urgent, Need Help, Formula Problem, Code Problem,
    and Need Advice will not get quick attention or may not be answered.
    2) Don't post a question in the thread of another member.
    3) Don't post questions regarding breaking or bypassing any
    security measure.
    4) Acknowledge the responses you receive, good or bad.
    5) Jobs posting is not allowed.
    6) Sharing copyrighted material and their links is not allowed.

    NOTE : Don't ever post confidential data in a workbook. Forum
    owners and members are not responsible for any loss.
    ---
    You received this message because you are subscribed to the
    Google Groups "MS EXCEL AND VBA MACROS" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to excel-macros+unsubscr...@googlegroups.com
    <mailto:excel-macros+unsubscr...@googlegroups.com>.
    To post to this group, send email to
    excel-macros@googlegroups.com <mailto:excel-macros@googlegroups.com>.
    Visit this group at http://groups.google.com/group/excel-macros.
    For more options, visit https://groups.google.com/groups/opt_out.



-- Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna
    be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this
    forum @ https://www.facebook.com/discussexcel

    FORUM RULES

    1) Use concise, accurate thread titles. Poor thread titles, like
    Please Help, Urgent, Need Help, Formula Problem, Code Problem, and
    Need Advice will not get quick attention or may not be answered.
    2) Don't post a question in the thread of another member.
    3) Don't post questions regarding breaking or bypassing any
    security measure.
    4) Acknowledge the responses you receive, good or bad.
    5) Jobs posting is not allowed.
    6) Sharing copyrighted material and their links is not allowed.

    NOTE : Don't ever post confidential data in a workbook. Forum
    owners and members are not responsible for any loss.
    ---
    You received this message because you are subscribed to the Google
    Groups "MS EXCEL AND VBA MACROS" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to excel-macros+unsubscr...@googlegroups.com
    <mailto:excel-macros%2bunsubscr...@googlegroups.com>.
    To post to this group, send email to excel-macros@googlegroups.com
    <mailto:excel-macros@googlegroups.com>.
    Visit this group at http://groups.google.com/group/excel-macros.
    For more options, visit https://groups.google.com/groups/opt_out.



--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE : Don't ever post confidential data in a workbook. Forum owners and members are not responsible for any loss.
---
You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group. To unsubscribe from this group and stop receiving emails from it, send an email to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.



--
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- You received this message because you are subscribed to the Google Groups "MS EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to