+ Reply to Thread
Results 1 to 4 of 4

macro is needed

  1. #1
    Registered User
    Join Date
    02-25-2005
    Posts
    38

    macro is needed

    i have 2 columns
    1) Company names
    2) Dividend Per share

    if the company did not pay dividend the cell is empty

    the question is
    i want to find out which companies paid out dividend

    thanks in advance
    Attached Files Attached Files

  2. #2
    Tim Williams
    Guest

    Re: macro is needed

    > if the company did not pay dividend the cell is empty
    >
    > the question is
    > i want to find out which companies paid out dividend


    ....and do what with the information? Enter it in another column? Pop up a
    messagebox?

    Eg:

    '*********************************
    dim c as range
    for each c in activesheet.range("A2:A100")

    if c.offset(0,1).value<>"" then
    c.offset(0,2).value="Paid dividend"
    end if

    next c
    '**********************************


    Tim


    "barkiny" <[email protected]> wrote in
    message news:[email protected]...
    >
    > i have 2 columns
    > 1) Company names
    > 2) Dividend Per share
    >
    > if the company did not pay dividend the cell is empty
    >
    > the question is
    > i want to find out which companies paid out dividend
    >
    > thanks in advance
    >
    >
    > +-------------------------------------------------------------------+
    > |Filename: question.zip |
    > |Download: http://www.excelforum.com/attachment.php?postid=4526 |
    > +-------------------------------------------------------------------+
    >
    > --
    > barkiny
    > ------------------------------------------------------------------------
    > barkiny's Profile:
    > http://www.excelforum.com/member.php...o&userid=20397
    > View this thread: http://www.excelforum.com/showthread...hreadid=526646
    >




  3. #3
    Registered User
    Join Date
    02-25-2005
    Posts
    38
    if the company pays out dividend
    it will put name in another column in another sheet
    but there will be no blanks

  4. #4
    Bob Phillips
    Guest

    Re: macro is needed

    Select a number of cells to accommodate all possible values on the other
    sheet, and in the formula bar enter

    =IF(ISERROR(SMALL(IF(Sheet1!$B$1:$B$20<>"",ROW(Sheet1!$A1:$A20),""),ROW(Shee
    t1!$A1:$A20))),"",
    INDEX(Sheet1!$A$1:$A$20,SMALL(IF(Sheet1!$B1:$B20<>"",ROW(Sheet1!$A1:$A20),""
    ),ROW(Sheet1!$A1:$A20))))

    which is an array formula, it should be committed with Ctrl-Shift-Enter, not
    just Enter.

    --
    HTH

    Bob Phillips

    (remove nothere from email address if mailing direct)

    "barkiny" <[email protected]> wrote in
    message news:[email protected]...
    >
    > if the company pays out dividend
    > it will put name in another column in another sheet
    > but there will be no blanks
    >
    >
    > --
    > barkiny
    > ------------------------------------------------------------------------
    > barkiny's Profile:

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




+ 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