#1   Report Post  
KimStarbase
 
Posts: n/a
Default Data Validation

I would like to have my drop down box in excel read D1a - cleaning, but when
I click on it, only D1a appears in the cell. Is there any way of
accomplishing this task. I am a novice to excel and have never used VBA so I
may need a detailed explantation.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

Put this in your worksheet code module (right-click the worksheet tab
and choose View Code):

Private Sub Worksheet_Calculate()
Dim nPos As Long
With Range("F1")
nPos = InStr(1, .Text, "-")
If nPos Then
On Error Resume Next
Application.EnableEvents = False
.Value = Trim(Left(.Text, nPos - 1))
Application.EnableEvents = True
On Error GoTo 0
End If
End With
End Sub

In many versions of XL, selecting a value from a Validation dropdown
doesn't fire any events, so you may need to enter

=F1

in an out-of-the-way cell (which could be hidden).

Of course, change F1 to your desired cell.


In article ,
"KimStarbase" wrote:

I would like to have my drop down box in excel read D1a - cleaning, but when
I click on it, only D1a appears in the cell. Is there any way of
accomplishing this task. I am a novice to excel and have never used VBA so I
may need a detailed explantation.

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
Data validation screen size Brad Excel Discussion (Misc queries) 2 July 13th 05 09:18 PM
data validation lists [email protected] Excel Discussion (Misc queries) 5 June 25th 05 07:44 PM
named range, data validation: list non-selected items, and new added items KR Excel Discussion (Misc queries) 1 June 24th 05 05:21 AM
Pulling data from 1 sheet to another Dave1155 Excel Worksheet Functions 1 January 12th 05 05:55 PM
Using Validation List from Another Workbook with Dependent Data Mike R. Excel Worksheet Functions 5 January 8th 05 07:06 PM


All times are GMT +1. The time now is 10:32 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"