Help with data validation list and if formula

kino4city

New Member
Joined
May 17, 2011
Messages
11
:help::help::help:

=IF($C$12=DUTY1P,DUTY1,IF($C$12=DUTY2P,DUTY2,IF($C$12=DUTY3P,DUTY3,IF($C$12=DUTY4P,DUTY4,IF($C$12=DUTY5P,DUTY5,IF($C$12=DUTY6P,DUTY6,IF($C$12=DUTY7P,DUTY7,DUTY9)))))))

The above is what i have tried to do, the DUTY1P and DUTY1 etc. are my defined ranges.

I'm trying to get excel to enter a list in D12, based on what C12 value is.

If anyone can help, this would be much appreciated, as this is really annoying me now.
:banghead:

Thanks in advance,
Chris
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
:help::help::help:


=IF($C$12=DUTY1P,DUTY1,IF($C$12=DUTY2P,DUTY2,IF($C$12=DUTY3P,DUTY3,IF($C$12=DUTY4P,DUTY4,IF($C$12=DUTY5P,DUTY5,IF($C$12=DUTY6P,DUTY6,IF($C$12=DUTY7P,DUTY7,DUTY9)))))))​

The above is what i have tried to do, the DUTY1P and DUTY1 etc. are my defined ranges.​

I'm trying to get excel to enter a list in D12, based on what C12 value is.​

If anyone can help, this would be much appreciated, as this is really annoying me now.
:banghead:

Thanks in advance,
Chris​
How about replying with the text left aligned!

Tell us what the actual cell addresses are for a couple of those defined names.

For example, what does DUTY1P and DUTY1 refer to?
 
Upvote 0
DUTY1 = SheetName:"LOOKUP";Range:"C31"
DUTY1P = SheetName:"LOOKUP";Range:"AA31:AA33"

DUTY2 = SheetName:"LOOKUP";Range:"C31:C33"
DUTY2P = SheetName:"LOOKUP";Range:"AD31:AD33"

DUTY3 = SheetName:"LOOKUP";Range:"C34:C35"
DUTY3P = SheetName:"LOOKUP";Range:"AF31:AF33"

DUTY4 = SheetName:"LOOKUP";Range:"C35:C36"
DUTY4P = SheetName:"LOOKUP";Range:"AC31:AC40"

DUTY5 = SheetName:"LOOKUP";Range:"C34:C37"
DUTY5P = SheetName:"LOOKUP";Range:"AE31:AE34"

DUTY6 = SheetName:"LOOKUP";Range:"C35"
DUTY6A = SheetName:"LOOKUP";Range:"AG31"

DUTY7 = SheetName:"LOOKUP";Range:"C36"
DUTY7P = SheetName:"LOOKUP";Range:"AH31:AH33"

DUTY9 = SheetName:"LOOKUP";Range:"C34:C36"

Hope thats ok??

The only reason i slimmed it down and used defined ranges is because the data validation source box, on excel 2010, restricts the entry length massively.

Sorry about the alignment...

Thanks,
Chris
 
Upvote 0
:help::help::help:



=if($c$12=duty1p,duty1,if($c$12=duty2p,duty2,if($c$12=duty3p,duty3,if($c$12=duty4p,duty4,if($c$12=duty5p,duty5,if($c$12=duty6p,duty6,if($c$12=duty7p,duty7,duty9)))))))​

the above is what i have tried to do, the duty1p and duty1 etc. Are my defined ranges.​

I'm trying to get excel to enter a list in d12, based on what c12 value is.​

If anyone can help, this would be much appreciated, as this is really annoying me now.
:banghead:

Thanks in advance,
chris​

Try...

D12:

=INDIRECT(IF(RIGHT($C12)="P",LEFT($C12,LEN($C12)-1),$C12))
 
Upvote 0
Try...

D12:

=INDIRECT(IF(RIGHT($C12)="P",LEFT($C12,LEN($C12)-1),$C12))

No luck Aladin, I've tried it in the data validation list source and also the cell itself, but just errors.

if you think of anything else let me know,

ALSO TO ALL I THINK THIS WOULD BE EASIER TO DO IN VBA BUT I JUST DON'T UNDERSTAND VBA, SO JUST LET ME KNOW WHAT TO DO, CHEERS

thanks,
chris
 
Upvote 0
DUTY1 = SheetName:"LOOKUP";Range:"C31"
DUTY1P = SheetName:"LOOKUP";Range:"AA31:AA33"

DUTY2 = SheetName:"LOOKUP";Range:"C31:C33"
DUTY2P = SheetName:"LOOKUP";Range:"AD31:AD33"

DUTY3 = SheetName:"LOOKUP";Range:"C34:C35"
DUTY3P = SheetName:"LOOKUP";Range:"AF31:AF33"

DUTY4 = SheetName:"LOOKUP";Range:"C35:C36"
DUTY4P = SheetName:"LOOKUP";Range:"AC31:AC40"

DUTY5 = SheetName:"LOOKUP";Range:"C34:C37"
DUTY5P = SheetName:"LOOKUP";Range:"AE31:AE34"

DUTY6 = SheetName:"LOOKUP";Range:"C35"
DUTY6A = SheetName:"LOOKUP";Range:"AG31"

DUTY7 = SheetName:"LOOKUP";Range:"C36"
DUTY7P = SheetName:"LOOKUP";Range:"AH31:AH33"

DUTY9 = SheetName:"LOOKUP";Range:"C34:C36"

Hope thats ok??

The only reason i slimmed it down and used defined ranges is because the data validation source box, on excel 2010, restricts the entry length massively.

Sorry about the alignment...

Thanks,
Chris
I'm getting ready to call it a day.

I'll check back tomorrow.
 
Upvote 0
No luck Aladin, I've tried it in the data validation list source and also the cell itself, but just errors.

if you think of anything else let me know,

ALSO TO ALL I THINK THIS WOULD BE EASIER TO DO IN VBA BUT I JUST DON'T UNDERSTAND VBA, SO JUST LET ME KNOW WHAT TO DO, CHEERS

thanks,
chris

What kind of errors?
 
Upvote 0
when entered in the cell =#ref!
When entered in data validation = just doesn't load options on the menu

DUTY2P refers to LOOKUP!$AD$31:$AD$33 and

DUTY2 refers to LOOKUP!$C$31:$C$33, right?

If C12 houses the string DUTY2P, data-validating D12 with the List option and as Source the formula:

=INDIRECT(IF(RIGHT($C12)="P",LEFT($C12,LEN($C12)-1),$C12))

should yield the items of DUTY2 in D12.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top