Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default send range results to a certian cell

walt

Looks like the code is missing an "End Sub"(no quotes)

Add after the last End If

You could use basically the same code but have it run automatically when you
change the value in A1

Private Sub Worksheet_Change(ByVal Target As Range)
v = Range("A1").Value

If v 500 And v < 1001 Then
Range("C4").Value = v
End If

If v 1000 And v < 25001 Then
Range("C5").Value = v
End If

If v 25000 And v < 100001 Then
Range("C6").Value = v
End If

End Sub


This is sheet event code.

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

Copy/paste the above into that sheet module.

Enter a number in A1 and see what happens.


Gord Dibben MS Excel MVP

On Mon, 18 Dec 2006 12:20:00 -0800, walt wrote:

Hi, I tried this and I got an "end" error I am not very good with the macros
anf I may be doing something wrong , Could you be a litter more "step BY step"

Thanks
walt


"Gary''s Student" wrote:

Enter this macro:

Sub deal_it()
v = Range("A1").Value

If v 500 And v < 1001 Then
Range("C4").Value = v
End If

If v 1000 And v < 25001 Then
Range("C5").Value = v
End If

If v 25000 And v < 100001 Then
Range("C6").Value = v
End If

then enter a value in cell A1 and run the macro.
--
Gary's Student


"walt" wrote:

I would like to send certian range numbers to a specific cell from a single
cell such as

you would enter the number in a1
if the number is 501-1000 it would go yo c4
if the number is 1001-25000 it would go yo c5
if the number is 25001-100000 it would go yo c6

and so on


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
How to reference another cell based on what row a certian header i mkloosterboer Excel Worksheet Functions 2 July 3rd 09 05:15 PM
delete text in a cell using certian criteria Ken Excel Discussion (Misc queries) 4 April 12th 08 06:19 AM
send range results to a certian cell Jef Gorbach Excel Programming 0 December 16th 06 06:46 AM
cell input on certian dates!! n0 h4ck1ng Excel Discussion (Misc queries) 1 August 5th 05 09:04 AM
Send Userform results to worksheet TimT Excel Programming 3 July 8th 05 11:11 PM


All times are GMT +1. The time now is 12:53 AM.

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"