macro is needed

B

barkiny

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 |
+-------------------------------------------------------------------+
 
T

Tim Williams

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
 
B

barkiny

if the company pays out dividend
it will put name in another column in another sheet
but there will be no blanks
 
B

Bob Phillips

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top