Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 106
Default Setting values in a cell

I created a flow chart in excel 2003. I want to set the value in cell M6 to
Y if i select cell B10 and N if I select cell C10. Any thoughts?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default Setting values in a cell

On Thu, 10 Jul 2008 10:47:02 -0700, Stephen
wrote:

I created a flow chart in excel 2003. I want to set the value in cell M6 to
Y if i select cell B10 and N if I select cell C10. Any thoughts?


Try this:

Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("B10")) Is Nothing Then
Cells(6, "M") = "Y"
ElseIf Not Intersect(Target, Range("C10")) Is Nothing Then
Cells(6, "M") = "N"
End If
End Sub

Hope this helps! / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 106
Default Setting values in a cell

I et an object required error when running this. I am sorry but I dont know
enough to debug this.

Thx,
Stephen
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Setting values in a cell

The code Lars posted is sheet event code and must be placed in the worksheet.

Right-click on the sheet tab and "View Code".

Copy/paste the code into that module.

Alt + q to return to the Excel window.

Select B10 and see Y appear in M6

Select C10 and see N appear in M6


Gord Dibben MS Excel MVP


On Thu, 10 Jul 2008 11:16:08 -0700, Stephen
wrote:

I et an object required error when running this. I am sorry but I dont know
enough to debug this.

Thx,
Stephen


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
Setting Chart X and Y values indirectly Manos Charts and Charting in Excel 2 October 29th 07 07:39 PM
Auto setting the charts y axis values Lasci Charts and Charting in Excel 0 November 29th 06 10:14 AM
Setting default values in a drop down list in excel? Dave Excel Discussion (Misc queries) 2 May 18th 06 07:33 AM
Setting a cell equal to another worksheet cell fails (sometimes) Richard Excel Worksheet Functions 2 March 10th 06 04:11 AM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM


All times are GMT +1. The time now is 08:25 PM.

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"