+ Reply to Thread
Results 1 to 5 of 5

Macro: If(And(...

Hybrid View

herve Macro: If(And(... 06-02-2006, 03:54 AM
Guest Re: Macro: If(And(... 06-02-2006, 04:10 AM
herve Thanks Paul, but i would... 06-02-2006, 04:21 AM
Guest Re: Macro: If(And(... 06-02-2006, 05:00 AM
herve Many Thanks Bob 06-02-2006, 08:15 AM
  1. #1
    Registered User
    Join Date
    09-16-2005
    Posts
    32

    Macro: If(And(...

    Hi All,
    anyone could help me to write a Macro for:

    In Colomn A, From A12 to A?? I have Text.
    The last Cell in Colomn A is variable, (is A50 now but tom, can be A500)

    I want a Macro that does:
    In Cell E12, the Formula :
    E12 = If(And(B12="",C12="",D12<>""),D12)
    and copy the formula to Cell E...(last Value in Colomn A).
    E13 = if(and(B13="",C13="",D13<>""),D13)
    ....
    ....
    Exx = if(and(Bxx="",Cxx="",Dxx<>""),Dxx)

    Regards
    Herve

  2. #2
    paul.robinson@it-tallaght.ie
    Guest

    Re: Macro: If(And(...

    Hi
    No need for a macro. Simply highlight the column of cells in column E
    you want to apply the formula too (with the first cell in the column
    containing your formula) and do Edit, Fill Down.

    regards
    Paul

    herve wrote:
    > Hi All,
    > anyone could help me to write a Macro for:
    >
    > In Colomn A, From A12 to A?? I have Text.
    > The last Cell in Colomn A is variable, (is A50 now but tom, can be
    > A500)
    >
    > I want a Macro that does:
    > In Cell E12, the Formula :
    > E12 = If(And(B12="",C12="",D12<>""),D12)
    > and copy the formula to Cell E...(last Value in Colomn A).
    > E13 = if(and(B13="",C13="",D13<>""),D13)
    > ...
    > ...
    > Exx = if(and(Bxx="",Cxx="",Dxx<>""),Dxx)
    >
    > Regards
    > Herve
    >
    >
    > --
    > herve
    > ------------------------------------------------------------------------
    > herve's Profile: http://www.excelforum.com/member.php...o&userid=27314
    > View this thread: http://www.excelforum.com/showthread...hreadid=547758



  3. #3
    Registered User
    Join Date
    09-16-2005
    Posts
    32
    Thanks Paul,
    but i would like to run this in a macro in order to avoid this kind of action (copy paste)

    Thanks

  4. #4
    Bob Phillips
    Guest

    Re: Macro: If(And(...

    Dim iLastRow As Long
    iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
    Range("E12").Resize(iLastRow - 11).Formula = _
    "=IF(AND(B12="""",C12="""",D12<>""""),D12,"""")"



    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "herve" <herve.28rlpm_1149234902.4708@excelforum-nospam.com> wrote in
    message news:herve.28rlpm_1149234902.4708@excelforum-nospam.com...
    >
    > Hi All,
    > anyone could help me to write a Macro for:
    >
    > In Colomn A, From A12 to A?? I have Text.
    > The last Cell in Colomn A is variable, (is A50 now but tom, can be
    > A500)
    >
    > I want a Macro that does:
    > In Cell E12, the Formula :
    > E12 = If(And(B12="",C12="",D12<>""),D12)
    > and copy the formula to Cell E...(last Value in Colomn A).
    > E13 = if(and(B13="",C13="",D13<>""),D13)
    > ...
    > ...
    > Exx = if(and(Bxx="",Cxx="",Dxx<>""),Dxx)
    >
    > Regards
    > Herve
    >
    >
    > --
    > herve
    > ------------------------------------------------------------------------
    > herve's Profile:

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




  5. #5
    Registered User
    Join Date
    09-16-2005
    Posts
    32
    Many Thanks Bob

+ 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