insert info only if cell is blank (Max from Singapore ref)

K

Kevin

Hi, I got this code from Max that autocopies info from dropdown lists on to a
scheduling sheet -
=IF(ISERROR(SMALL(OFFSET(WS1!$J:$J,,MATCH(WSN,WS1!$K$1:$IV$1,0)),ROWS($A$1:A1))),"",INDEX(WS1!A:A,MATCH(SMALL(OFFSET(WS1!$J:$J,,MATCH(WSN,WS1!$K$1:$IV$1,0)),ROWS($A$1:A1)),OFFSET(WS1!$J:$J,,MATCH(WSN,WS1!$K$1:$IV$1,0)),0)))
...which works perfect. However, I now have a new dilemma. I have several
dropdown lists which can be used to schedule each person to any of several
codes. The code looks at the data retrieved from dropdown1 and inserts it
accordingly. Let's say I use dropdown1 to schedule Bob for Monday at 8:30am
for code # 123. On his schedule, we would see this info in that time slot for
Monday. Next week I want to schedule Bob for a different code in the same
time slot on Monday but now I use dropdown2 for the info. How can I tell the
code to insert that info into the time slot providing it's already empty? Can
I have the code look at the info being generated by all the dropdown lists
instead of just dropdown1 as it is doing now?
 
K

Kevin

ok, I figured out if I just expand the columns on WS1 (where the dropdown
data is pulled into), it will insert the data from dropdown2 into the time
slot provided it's empty - otherwise it fills in the data it sees first,
which would be dropdown1 info in this case. That's fine, but it there a way
to have a message come up to tell you if you're trying to insert data into a
time slot that's already filled? This would provide a kind of error
correction if someone tried to schedule 2 different codes for the same person
in the same time slot. Thanks, -Kevin
 

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