Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using range in formula
Hello all,
Another simple question. What I want do here is do this formula down through column B. B1 would be A1*increase, B2 would be A2*increase, etc. I know this is simple enough to do in Excel but.... I'm trying to learn VBA. dim increase as integer increase = Range("H1") For Each c In Sheets("sheet1").Range("A1:A10") c.Value = Range("B1") * increase Next c Which brings me to my second question. Does anyone (or website) have sample or old SS w/ code that I could have to see how simple things work. Some code is basic and repeating (how to hide a row, how to enter a custom toolbar)and needed to use VB code realistically. I'm learning but it's taking forever reading help files and this newsgroup. When I can record a macro and look at it , things make more sense so I was hoping..... THanks in advance for any and all help jeffP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using range in formula
Is this a macro what you would like to do?
Dim increase As Integer Dim j As Integer increase = Range("H1") For j = 1 To 10 Range("B" & j).Value = Range("A" & j).Value * increase Next -- Samura "jeffP" wrote in message ... Hello all, Another simple question. What I want do here is do this formula down through column B. B1 would be A1*increase, B2 would be A2*increase, etc. I know this is simple enough to do in Excel but.... I'm trying to learn VBA. dim increase as integer increase = Range("H1") For Each c In Sheets("sheet1").Range("A1:A10") c.Value = Range("B1") * increase Next c |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
using range in formula
Try using the Macro Record facility which will give you a good start.
-- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "jeffP" wrote in message ... Hello all, Another simple question. What I want do here is do this formula down through column B. B1 would be A1*increase, B2 would be A2*increase, etc. I know this is simple enough to do in Excel but.... I'm trying to learn VBA. dim increase as integer increase = Range("H1") For Each c In Sheets("sheet1").Range("A1:A10") c.Value = Range("B1") * increase Next c Which brings me to my second question. Does anyone (or website) have sample or old SS w/ code that I could have to see how simple things work. Some code is basic and repeating (how to hide a row, how to enter a custom toolbar)and needed to use VB code realistically. I'm learning but it's taking forever reading help files and this newsgroup. When I can record a macro and look at it , things make more sense so I was hoping..... THanks in advance for any and all help jeffP |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
using range in formula
That was exactly want I needed to know. How to assign a
variable to the row and keep the column the same. Thank you. -----Original Message----- Is this a macro what you would like to do? Dim increase As Integer Dim j As Integer increase = Range("H1") For j = 1 To 10 Range("B" & j).Value = Range("A" & j).Value * increase Next -- Samura "jeffP" wrote in message ... Hello all, Another simple question. What I want do here is do this formula down through column B. B1 would be A1*increase, B2 would be A2*increase, etc. I know this is simple enough to do in Excel but.... I'm trying to learn VBA. dim increase as integer increase = Range("H1") For Each c In Sheets("sheet1").Range("A1:A10") c.Value = Range("B1") * increase Next c . |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
using range in formula
Bob,
Actually that's exactly what I've been doing, and I am learning (slowly) but I miss key things like Samura just showed me . Assigning a variable row # to a static column. jeffP -----Original Message----- Try using the Macro Record facility which will give you a good start. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "jeffP" wrote in message ... Hello all, Another simple question. What I want do here is do this formula down through column B. B1 would be A1*increase, B2 would be A2*increase, etc. I know this is simple enough to do in Excel but.... I'm trying to learn VBA. dim increase as integer increase = Range("H1") For Each c In Sheets("sheet1").Range("A1:A10") c.Value = Range("B1") * increase Next c Which brings me to my second question. Does anyone (or website) have sample or old SS w/ code that I could have to see how simple things work. Some code is basic and repeating (how to hide a row, how to enter a custom toolbar)and needed to use VB code realistically. I'm learning but it's taking forever reading help files and this newsgroup. When I can record a macro and look at it , things make more sense so I was hoping..... THanks in advance for any and all help jeffP . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I enter formula sum(range+range)*0.15 sumif(range=3) | Excel Discussion (Misc queries) | |||
conditional formula: sum a range if text present in another range | Excel Discussion (Misc queries) | |||
formula to sort a range so that it matches the exact rows of a column that is outside that range? | Excel Discussion (Misc queries) | |||
Macro to input formula in range based on another range | Excel Programming | |||
Range.Formula and Range question using Excel Automation | Excel Programming |