Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for copying values from the dropdown list in Excel


Hello,

Could somebody give me a macro for copying a particular value from a
dropdown list into a next column.

For example:

If I select "1" (from the dropdown list) then paste "1" to next
column(same row) ,
If I select "2" (from the dropdown list) paste "2" to next column(same
row) on deleting the previously selected option (i.e, "1")

Please help me in writing this Macro.:Blink
Thanks


--
Tulsi
------------------------------------------------------------------------
Tulsi's Profile: http://www.thecodecage.com/forumz/member.php?userid=263
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90769

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for copying values from the dropdown list in Excel


Firstly, Welcome to The Code Cage, why would you want a duplicate value
in the next column when you can use the value from your dropdown
(assuming its a data validation list), anyway you don't need code for
that you can simply use =A1 in B1 if your dropdown is in A1.

Tulsi;324817 Wrote:
Hello,

Could somebody give me a macro for copying a particular value from a
dropdown list into a next column.

For example:

If I select "1" (from the dropdown list) then paste "1" to next
column(same row) ,
If I select "2" (from the dropdown list) paste "2" to next column(same
row) on deleting the previously selected option (i.e, "1")

Please help me in writing this Macro.:Blink
Thanks



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90769

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for copying values from the dropdown list in Excel


Hi Simon, (Reply from anyone is appreciated)
Thank u for your instant reply :)

I am very new to this. I have no idea with the formula =A1 in B1 you
gave. I applied it in the insert function option under formulas. I did
not know how to go about the same.

My actual problem statement is given below:

First of all, i am using MS Excel 2007, Windows XP

I have an excel document with two sheets(sheet1 and Sheet2).
Sheet1 contains student details. And sheet2 contains the dropdown
lists.
I have created the dropdown list using data validation.

The first drop down list is in row "B4" which contains numbers
"1,2,3,4,5,6,7,invalid" as list options.

Second dropdown is in "B8" which contains company names like "ABC
Limited, DCB Limited" and so on..

Third dropdown is in "B12" which contains different posts like
"Testing, Development, Support" and so on...

Hence, when a person selects "1" from the first dropdown list
(B4,Sheet2) it should get copied to the row "D4"(sheet2). Also the
contents of D4 should get copied to H5 and E13 rows of Sheet1

But when a person selects "invalid" from the first dropdown list
(B4,Sheet2) it should allow the user to enter a value in to D4 of sheet2
.. Also that value entered by the user should get copied to H5 and E13
rows of Sheet1

The same is been applied to the second dropdown list and the third
dropdownlist.


For further understanding we have put the scenario in the form of an
algorithm. Let us know if you have problems in understanding the problem
statement.


-do select the Project version number(sheet2)

if priority is "invalid"
{
Create a text box in D5 of sheet2
Allow the user to enter invalid value in D4 of sheet2
}
else
{
copy the respective Project version number to D4 of sheet2 of same
sheet (D4,sheet2).
}

copy the contents of D4, sheet2 to Sheet1(H5 and E13)

end-


Please reply!!


--
Tulsi
------------------------------------------------------------------------
Tulsi's Profile: http://www.thecodecage.com/forumz/member.php?userid=263
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90769

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for copying values from the dropdown list in Excel


Hi simon,

I tried the below formula using insert function:
=CHOOSE(B4,1,2,3,4,5,6,7,\"INVALID\") [/b]

HERE AM ABLE TO COPY THE VALUES FROM DROPDOWN LIST (B4,WHICH HAS
DROPDOWN LIST CONTAINING \"1,2,3,4,5,6,7,INVALID\") TO D4 ROW OF THE
SAME SHEET,ONLY IF IT IS A NUMBER(1,2,3,4,5,6,7) .FOR \"INVALID\" OPTION
IT GIVES ERROR AS [b]#VALUE!

I am not able implement this for a dropdown list containing
strings/alphabets.

Also i need to add a textbox once the user selects "invalid" option
from the dropdown list.

Please help in solving this.:(
Reply from any expert is greatly appreciated!!!.


--
Tulsi
------------------------------------------------------------------------
Tulsi's Profile: http://www.thecodecage.com/forumz/member.php?userid=263
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=90769

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
Restricting values in a cell that already has a dropdown list in i BrianMo Excel Programming 1 September 18th 06 05:28 PM
Dropdown List from values in a Cell Range DrKacso Excel Programming 2 August 8th 06 11:15 PM
How do I trigger a macro by selecting from a dropdown list? Modell Excel Programming 3 April 26th 06 05:03 PM
Allow selection of multiple values in dropdown list in excel Nancy @ CHR Excel Discussion (Misc queries) 2 April 13th 06 10:44 PM
dropdown list to activate Macro Brad Excel Programming 6 May 25th 05 08:35 PM


All times are GMT +1. The time now is 02:49 PM.

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

About Us

"It's about Microsoft Excel"