View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Matt P.[_2_] Matt P.[_2_] is offline
external usenet poster
 
Posts: 14
Default Cell Reference in formula increment

Lets say that I want to do a NETWORKDAYS calculation for a
person or an item. I want to search a particular column
of 'other' data that lets say it is a person, I only want
Bob's Workdays figured out. For my purposes there are two
date fields that get checked that are next to Bob's name,
It is possible that there might be the text "N/A" in the
field or the cell can be empty "". That is what my
equation already checks. What I have not figured out is
how to exclude data from my equation that does not relate
to Bob. Excel will automatically put a zero or "" in the
cell where the formula is, I would like the formula to
either leave absolutely nothing in the cell it is in or I
would like a way to check the next row of data for the
same information like using a loop until I reach an empty
cell(which would indicate the last text entered in that
field.)
Example:
A1=Bob B1="" C1=1/3/04
A2=John B2="N/A" C1=1/3/04
A3=Bob B3=1/1/04 C1=1/3/04
A4=Bob B4=12/22/03 C1=1/3/04
If my memory is serving me correctly my output using the
formula stated originally will be something like
D1=""
D2="N/A"
D3=2
D4=11
I would like it if the results for A2=John would just
disappear of the results could some how be grabbed from
the next row down. Creating D3 and D4's results to move up
one cell. Thank you.
-----Original Message-----
Hi
not really sure what you're trying to do. What do you

want to evaluate
in the other cells. Maybe you can describe your

conditions in 'pseudo
code'.

--
Regards
Frank Kabel
Frankfurt, Germany


Matt P. wrote:
I was wondering how to calculate NETWORLDAYS based on
certain conditions. For my current situation I have 2
checks that see if either an N/A or a ""(blank) should

be
displayed, if neither of those conditions is true then

to
fill the second argument of the nested If function I

have
the NETWORKDAYS function. Ex Formula : =IF('sheet1'!
E53="N/A","N/A",IF('sheet1'!E53="","",NETWORKDAYS

('sheet1'!
D53,'sheet1'!E53,'sheet1'!D53))). What I want is a way
to check another column of data to see if I even want to
evaluate any of these cases. If I do not want to

evaluate
any of these cases based on the other columns data I
either want there to be absolutely nothing in the cell
including the formula or What I would really like is for
the formula to increment its references to (sheet1'!E54)
(replacing the sheet1'!E53's) for example and check the
values if the previous case is thrown out. I would like
this to happen in the cell that is going to have the
formula. If this is not possible using excel formulas
could anyone point me in the right direction to a VBA
solution for excel. I'm assuming for the algorithm

there
has to be an end case like and empty cell that would

stop
the increment etc.....Thank you for your time.


.