+ Reply to Thread
Results 1 to 3 of 3

Alignment

Hybrid View

  1. #1
    ED
    Guest

    Alignment

    Can anyone help?


    >> Code please to align wording in a cell such as:


    For c = 1 to 1000
    If cell Ec is greater than 0 the wording in cell Cc is aligned right,
    other wise wording in cell Cc is aligned left.

    Thanks in advance

    Ed English

  2. #2
    JE McGimpsey
    Guest

    Re: Alignment

    One way:

    Dim c As Long
    For c = 1 To 1000
    Cells(c, 3).HorizontalAlignment = _
    IIf(Cells(c, 5).Value > 0, xlRight, xlLeft)
    Next c



    <l422g15ivegimq7au8pgp6ns0kbmoc7inu@4ax.com>,
    ED <ee15803@cox-internet.com> wrote:

    > Can anyone help?
    >
    >
    > >> Code please to align wording in a cell such as:

    >
    > For c = 1 to 1000
    > If cell Ec is greater than 0 the wording in cell Cc is aligned right,
    > other wise wording in cell Cc is aligned left.
    >
    > Thanks in advance
    >
    > Ed English


  3. #3
    ED
    Guest

    Re: Alignment

    Works well.

    Thank you,

    Ed English


    On Mon, 15 Aug 2005 15:50:18 -0600, JE McGimpsey
    <jemcgimpsey@mvps.org> wrote:

    >One way:
    >
    > Dim c As Long
    > For c = 1 To 1000
    > Cells(c, 3).HorizontalAlignment = _
    > IIf(Cells(c, 5).Value > 0, xlRight, xlLeft)
    > Next c
    >
    >
    >
    ><l422g15ivegimq7au8pgp6ns0kbmoc7inu@4ax.com>,
    > ED <ee15803@cox-internet.com> wrote:
    >
    >> Can anyone help?
    >>
    >>
    >> >> Code please to align wording in a cell such as:

    >>
    >> For c = 1 to 1000
    >> If cell Ec is greater than 0 the wording in cell Cc is aligned right,
    >> other wise wording in cell Cc is aligned left.
    >>
    >> Thanks in advance
    >>
    >> Ed English



+ 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