Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to reference another cell based on what row a certian header i | Excel Worksheet Functions | |||
delete text in a cell using certian criteria | Excel Discussion (Misc queries) | |||
send range results to a certian cell | Excel Programming | |||
cell input on certian dates!! | Excel Discussion (Misc queries) | |||
Send Userform results to worksheet | Excel Programming |