Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-18-2025, 07:55 AM
MartinGM MartinGM is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
Competent Performer
Concatenating two ranges in data validation
 
Join Date: May 2023
Location: England
Posts: 101
MartinGM is on a distinguished road
Default Concatenating two ranges in data validation

In a data validation setting I want to show the concatenation of two named ranges.

I can do this by concatenating them on a worksheet with the VSTACK funtion, applying a new range name to the result, and referencing the new range name in the data validation.



That works, but is clumsy and takes some maintenance if the constituent ranges change in size.

I tried creating a named range with the definition =VSTACK(Range 1,Range2) then referencing that name in the data validation, but it wasn't accepted.

Neither did entering this in the data validation setting =Range1 & Range2

Is there another simple way to have two ranges in a data validation setting ?
Reply With Quote
  #2  
Old 04-18-2025, 08:10 AM
Alansidman's Avatar
Alansidman Alansidman is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
עַם יִשְׂרָאֵל חַי
 
Join Date: Apr 2019
Location: Steamboat Springs
Posts: 112
Alansidman has a spectacular aura aboutAlansidman has a spectacular aura aboutAlansidman has a spectacular aura about
Default

In the attached file, I created a list in columns A and B. I then imported them to Power Query and merged them with a space separator. I then closed them to a table in column D. I then created a data validation in 1F for the values in Column D. I then added values to Column A and B. Clicked on Data Refresh All and the table in Column D is updated. The data validation is also updated in Column F.
Attached Files
File Type: xlsx PQ Merge Data Validation.xlsx (16.8 KB, 0 views)
__________________
Alan עַם יִשְׂרָאֵל חַ Using O365 v2505
Reply With Quote
  #3  
Old 04-18-2025, 10:02 AM
MartinGM MartinGM is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
Competent Performer
Concatenating two ranges in data validation
 
Join Date: May 2023
Location: England
Posts: 101
MartinGM is on a distinguished road
Default

Thank you.
Not simple, but it works
Reply With Quote
  #4  
Old 04-19-2025, 12:06 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Alternatively : What you need to do is write the VSTACK formula, let's say in K1. Then, point the DV list to =K1#
( VSTACK returns an array whereas DV needs a reference to a range)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 04-19-2025, 07:20 AM
MartinGM MartinGM is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
Competent Performer
Concatenating two ranges in data validation
 
Join Date: May 2023
Location: England
Posts: 101
MartinGM is on a distinguished road
Default

Thanks Pecover. That's very simple, and takes care of the varying size of the concatenated range
I hadn't seen the # suffix before - what does it do ?
Martin
Reply With Quote
  #6  
Old 04-20-2025, 12:28 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Concatenating two ranges in data validation Windows 11 Concatenating two ranges in data validation Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

The hash symbol is used to refer to a spill range in MS365 ( it cannot refer to a "non spill" range)


Any way of adding your XL version to your sig if higher than 2021? ( see mine)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Data Validation firozmohammed Excel 4 11-18-2023 01:55 AM
Concatenating two ranges in data validation Copying and Concatenating data in excel based on a value in another column BoardingSUP Excel Programming 5 10-17-2021 08:05 AM
Need to copy specific ranges column data as row data from one worksheet to another using excel VBA ganesang Excel Programming 1 03-26-2020 06:18 AM
Concatenating two ranges in data validation Data Validation List based on Two Named Ranges Rich18144 Excel 4 01-14-2016 04:37 AM
Data validation with IF Klyxrastafari Excel 1 10-03-2011 04:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:20 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft