Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Noemi
 
Posts: n/a
Default update details using vba

Hi
I have a validation list over 2 cells which when a specific word is selected
from the list then I need the word 'Please specify:' to be shown in another
cell but when any other word is selected from the list is is empty then I
dont want the 'Please specify:' to be visible.

Can anyone help.

I have tried the following but does not work and I dont know why.

Private Sub Worksheet_selectionChange(ByVal Target As Range)

If Target.Address = "G26" Then
If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If

End Sub

Thanks
Noemi
  #2   Report Post  
ShaunM
 
Posts: n/a
Default update details using vba


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile: http://www.excelforum.com/member.php...o&userid=18610
View this thread: http://www.excelforum.com/showthread...hreadid=479018

  #3   Report Post  
Noemi
 
Posts: n/a
Default update details using vba

Hi Shaun
It did not help, still nothing happens.

Any other suggestions.

Thanks
Noemi

"ShaunM" wrote:


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile: http://www.excelforum.com/member.php...o&userid=18610
View this thread: http://www.excelforum.com/showthread...hreadid=479018


  #4   Report Post  
Shatin
 
Posts: n/a
Default update details using vba

Works on my computer. But Shaun, why must the address be "$G$26" and can't
be simply "G26"?

Thanks!

"Noemi" wrote in message
...
Hi Shaun
It did not help, still nothing happens.

Any other suggestions.

Thanks
Noemi

"ShaunM" wrote:


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile:

http://www.excelforum.com/member.php...o&userid=18610
View this thread:

http://www.excelforum.com/showthread...hreadid=479018




  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default update details using vba

The .address property has an option that allows you to include those dollar
signs or not.

If you don't want them:
if Target.Address(rowabsolute:=False, columnabsolute:=False) = "G26" then

or simply:
if Target.Address(0,0) = "G26" then

(False and 0 will be treated the same)


Shatin wrote:

Works on my computer. But Shaun, why must the address be "$G$26" and can't
be simply "G26"?

Thanks!

"Noemi" wrote in message
...
Hi Shaun
It did not help, still nothing happens.

Any other suggestions.

Thanks
Noemi

"ShaunM" wrote:


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM
------------------------------------------------------------------------
ShaunM's Profile:

http://www.excelforum.com/member.php...o&userid=18610
View this thread:

http://www.excelforum.com/showthread...hreadid=479018



--

Dave Peterson


  #6   Report Post  
Shatin
 
Posts: n/a
Default update details using vba

Dave,

Many thanks for the explanation!

"Dave Peterson" wrote in message
...
The .address property has an option that allows you to include those

dollar
signs or not.

If you don't want them:
if Target.Address(rowabsolute:=False, columnabsolute:=False) = "G26"

then

or simply:
if Target.Address(0,0) = "G26" then

(False and 0 will be treated the same)


Shatin wrote:

Works on my computer. But Shaun, why must the address be "$G$26" and

can't
be simply "G26"?

Thanks!

"Noemi" wrote in message
...
Hi Shaun
It did not help, still nothing happens.

Any other suggestions.

Thanks
Noemi

"ShaunM" wrote:


Hi Noemi

Try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$G$26" Then

If Range("G26").Value = "Other" Then
Range("E28").Value = "Please specify:"
Else
Range("E28").Value = ""
End If
End If


End Sub

Regards
Shaun


--
ShaunM

------------------------------------------------------------------------
ShaunM's Profile:

http://www.excelforum.com/member.php...o&userid=18610
View this thread:

http://www.excelforum.com/showthread...hreadid=479018



--

Dave Peterson



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
Update links prompt not wanted neeraj Excel Discussion (Misc queries) 5 September 23rd 05 06:34 PM
keep value from last update and don't ask to update links jh3016 Excel Discussion (Misc queries) 3 July 25th 05 01:37 AM
Stock Update Rob Reed Excel Worksheet Functions 0 July 15th 05 07:39 PM
Edit Links: make update manual Chrissorr Excel Discussion (Misc queries) 5 May 11th 05 11:57 PM
Update Individual Links mikxtr Excel Discussion (Misc queries) 3 January 21st 05 04:24 AM


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