Filling a cell automatically when data is put in another cell.
I am creating a production schedule of houses. So I use a # and text
(ex.671A). I used the fuction =IF(B5="","",(B4)) in cell C5 and continued all
the way through Y5(=IF(X5="","",(X4))). I did this to the next 3 rows also
(C6:Y8).
I only put text in B4 through B6 and B4 through Y4 leaving B7 and B8 empty.
So because of the functions, only row 5 and 6 got filled with data and 7 and
8 were left blank because i used the function to leave a cell blank if the
cell to the left is blank. Then on C9 i used the function
=IF(ISTEXT(B8),(B8),IF(ISTEXT(B7),(B7),IF(ISTEXT(B 6),(B6),IF(ISTEXT(B5),(B5),IF(ISTEXT(B4),(B4),"")) )))
and it gave me the data from B6 which is what I wanted. But before I did
this I had to format the all the cells to be 'text' cells.
The problem that I am having is that when I tried to do the rest of row 9
the same way, it wouldn't work. The cells came out blank. I am wondering if
this is happening because rows 7 and 8 already have function that is giving
these cells the result of 'blank'. and it can only read 'text' cells and
maybe that's why D9-Y9 is not reading these cells. I don't know what other
function to input so that these cells can work.
"Ken Wright" wrote:
You need to tell us what the function returns that woiuld lead you not to
count it as being 'the last data used'.
Various ways to do what you ask, but we have to know what criteria you use
to ignore the results of a function, ie perhaps it returns a blank, or a 0
etc.
Assuming your function returns a blank if 'data not used' then something like
=LOOKUP(99^99,C4:C8)
might do you.
--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03
----------
It's easier to beg forgiveness than ask permission :-)
"Alex s" wrote:
A created a schedule where I input data in cells B4-B28 and B4-Y4. I used a
function to copy the data from the previous cell from the previous column
(ex. C5 is copied from B4, D5 copied from C4, E5 from D4 and so on...)
I want D9 to check the previous rows in the previous column and used the
last data that was used. I want D9 to check to see if C8 has data and if it
doesn't then check C7, then C6, then C5, and C4. Lets just say the C4-C6 has
data, I want D9 to automatically use the data from C6, which is the last cell
with data. Keep in mind that C4-C8 already are using a function. If anybody
has an answer i would really appreciate it. And if you have a question, I'll
be more than gladly to try to explain it better. Thanks.
|