Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Two columns combined into one dropdownlist

Hi.
I've got two columns containing data. A third coulmn can only contain data
from those two. What I need to do is, when adding validation to the third
column, add the data registerd in column 1 to the data in column 2 so that I
get a list to choose from in the dropdownlist in column 3.
Anyone got any idea on how to solve this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Two columns combined into one dropdownlist

create a fourth location that has all the data and point your validation list
at this location.

--
Regards,
Tom Ogilvy


"OTS" wrote:

Hi.
I've got two columns containing data. A third coulmn can only contain data
from those two. What I need to do is, when adding validation to the third
column, add the data registerd in column 1 to the data in column 2 so that I
get a list to choose from in the dropdownlist in column 3.
Anyone got any idea on how to solve this?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Two columns combined into one dropdownlist

Is there a way to do that when the two columns change their size. The two
lists will not be static, since they change when the user adds data.

"Tom Ogilvy" wrote:

create a fourth location that has all the data and point your validation list
at this location.

--
Regards,
Tom Ogilvy


"OTS" wrote:

Hi.
I've got two columns containing data. A third coulmn can only contain data
from those two. What I need to do is, when adding validation to the third
column, add the data registerd in column 1 to the data in column 2 so that I
get a list to choose from in the dropdownlist in column 3.
Anyone got any idea on how to solve this?

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Two columns combined into one dropdownlist

Dim rng1 as Range, rng2 as Range, rng3 as Range
set rng1 = Range(Range("A1"),Range("A1").End(xldown))
set rng2 = Range(Range("B1"),Range("B1").End(xldown))
set rng3 = Range("IV1")
rng1.copy rng3
rng2.copy rng3.End(xldown)(2)
range(rng3,rng3.End(xldown)).Name = "List"

use List as the soure for your data validation.
Use the change event to update the data in IV2 (run the macro) whenever the
user makes a change in column A or B (adapt to your actual locations).

--
Regards,
Tom Ogilvy



"OTS" wrote:

Is there a way to do that when the two columns change their size. The two
lists will not be static, since they change when the user adds data.

"Tom Ogilvy" wrote:

create a fourth location that has all the data and point your validation list
at this location.

--
Regards,
Tom Ogilvy


"OTS" wrote:

Hi.
I've got two columns containing data. A third coulmn can only contain data
from those two. What I need to do is, when adding validation to the third
column, add the data registerd in column 1 to the data in column 2 so that I
get a list to choose from in the dropdownlist in column 3.
Anyone got any idea on how to solve this?

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Two columns combined into one dropdownlist

Great! Now I'm almost there I think. The only problem with this is that it
copies the cell and not the value of the cell. So I get the formula insted of
the value. This means that I do not get the desired result. What can I do to
just get the values instead?

"Tom Ogilvy" wrote:

Dim rng1 as Range, rng2 as Range, rng3 as Range
set rng1 = Range(Range("A1"),Range("A1").End(xldown))
set rng2 = Range(Range("B1"),Range("B1").End(xldown))
set rng3 = Range("IV1")
rng1.copy rng3
rng2.copy rng3.End(xldown)(2)
range(rng3,rng3.End(xldown)).Name = "List"

use List as the soure for your data validation.
Use the change event to update the data in IV2 (run the macro) whenever the
user makes a change in column A or B (adapt to your actual locations).

--
Regards,
Tom Ogilvy



"OTS" wrote:

Is there a way to do that when the two columns change their size. The two
lists will not be static, since they change when the user adds data.

"Tom Ogilvy" wrote:

create a fourth location that has all the data and point your validation list
at this location.

--
Regards,
Tom Ogilvy


"OTS" wrote:

Hi.
I've got two columns containing data. A third coulmn can only contain data
from those two. What I need to do is, when adding validation to the third
column, add the data registerd in column 1 to the data in column 2 so that I
get a list to choose from in the dropdownlist in column 3.
Anyone got any idea on how to solve this?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Combine data in two columns into one and sort the combined column alphabetically..how?? Tommy[_4_] Excel Discussion (Misc queries) 5 May 15th 23 11:46 AM
Scattered chart combined with columns and time-x-axis in XL2007 Holger Gerths Charts and Charting in Excel 4 November 1st 07 12:11 PM
Aligment of DropDownList reloader[_3_] Excel Programming 0 March 30th 06 02:31 PM
combined contents in two different columns rt10516 Excel Discussion (Misc queries) 2 September 20th 05 04:14 AM
Find min/max in 2 combined columns Tammi Excel Worksheet Functions 3 June 22nd 05 08:19 PM


All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"