Data Validation Source for dropdown cell based on variable range?

EssKayKay

Active Member
Joined
Jan 5, 2003
Messages
407
Office Version
  1. 2007
Platform
  1. Windows
Hello,

I’m having a problem assigning a source range to a dropdown cell where the first cell in the range is constant; however, the last cell varies. Example P33:P???.
I’m looking for a way to set the last cell range based on another cell value. I have a cell (S17) that holds the value of the last cell in the range (named LastPmtRow).

What I was looking for was a way to code the Data Validation Source that would allow the last cell to be modified. Something like one of the following unsuccessful attempts:

= ("P33:P" & "LastDataRow")
= ("P33:P" & LastDataRow)
= ("P33:P" & S17)
= ("$P$33:$P$" & S17)

Any suggestions would be appreciated.

Thanks for viewing,
Steve K.

EDIT - As a workaround I thought I could just set the source as a range that is bigger than I would ever need. Something like = P33:P2222. However, when I click on the dropdown arrow it displays the last cell in the range which is blank. If there was a way to display range in reverse order would be great. I tried setting the source to P2222:P33 but that did not work. gain, any other ideas would be appreciated.
 
Last edited:

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello,

I’m having a problem assigning a source range to a dropdown cell where the first cell in the range is constant; however, the last cell varies. Example P33:P???.
I’m looking for a way to set the last cell range based on another cell value. I have a cell (S17) that holds the value of the last cell in the range (named LastPmtRow).

What I was looking for was a way to code the Data Validation Source that would allow the last cell to be modified. Something like one of the following unsuccessful attempts:

= ("P33:P" & "LastDataRow")
= ("P33:P" & LastDataRow)
= ("P33:P" & S17)
= ("$P$33:$P$" & S17)

Any suggestions would be appreciated.

Thanks for viewing,
Steve K.

EDIT - As a workaround I thought I could just set the source as a range that is bigger than I would ever need. Something like = P33:P2222. However, when I click on the dropdown arrow it displays the last cell in the range which is blank. If there was a way to display range in reverse order would be great. I tried setting the source to P2222:P33 but that did not work. gain, any other ideas would be appreciated.

PS - EDIT
I forgot to add - I tried setting the validation to "Ignore Blank" but that did not work.
 
Upvote 0
The more I think about my workaround (reverse order) I suspect that is not what I want as then all the dates would be in reverse order. I want the dates in consecutive order with the blank cells at the end.

Sorry for all these follow ups but I could not edit my post(s).
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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