Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help using VBA in excel.
The following is some VBA code being run using a Macro.
ActiveCell.Select Selection.Interior.ColorIndex = 34 Range("G4").FormulaR1C1 = "=countbycolor(Belmarsh,34,FALSE)" End Sub "Belmarsh" is a cell range. Is there any way of inputting a cell specific cell range i.e. E11:B12 or $E$11:$B$12 in VBA. Whenever I try this it errors. Any ideas?? Thanks Chris |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help using VBA in excel.
Range("G4").Formula = "=countbycolor(E11:B12,34,FALSE)"
should work. Notice since the formula is in A1 notation, i use Formula rather than FormulaR1C1 -- Regards, Tom Ogilvy "Chris" wrote in message ... The following is some VBA code being run using a Macro. ActiveCell.Select Selection.Interior.ColorIndex = 34 Range("G4").FormulaR1C1 = "=countbycolor(Belmarsh,34,FALSE)" End Sub "Belmarsh" is a cell range. Is there any way of inputting a cell specific cell range i.e. E11:B12 or $E$11:$B$12 in VBA. Whenever I try this it errors. Any ideas?? Thanks Chris |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help using VBA in excel.
Hi
with activesheet.range("B11:E12") ..Interior.ColorIndex = 34 end with -- Regards Frank Kabel Frankfurt, Germany "Chris" schrieb im Newsbeitrag ... The following is some VBA code being run using a Macro. ActiveCell.Select Selection.Interior.ColorIndex = 34 Range("G4").FormulaR1C1 = "=countbycolor(Belmarsh,34,FALSE)" End Sub "Belmarsh" is a cell range. Is there any way of inputting a cell specific cell range i.e. E11:B12 or $E$11:$B$12 in VBA. Whenever I try this it errors. Any ideas?? Thanks Chris |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help using VBA in excel.
try ActiveCell.Interior.ColorIndex = 34 Range("G4").Formula= "=countbycolor(range("e11:b12"),34,FALSE)" -- Don Guillett SalesAid Software "Chris" wrote in message ... The following is some VBA code being run using a Macro. ActiveCell.Select Selection.Interior.ColorIndex = 34 Range("G4").FormulaR1C1 = "=countbycolor(Belmarsh,34,FALSE)" End Sub "Belmarsh" is a cell range. Is there any way of inputting a cell specific cell range i.e. E11:B12 or $E$11:$B$12 in VBA. Whenever I try this it errors. Any ideas?? Thanks Chris |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need help using VBA in excel.
Maybe you mean something like
Range("G4").Formula= "=countbycolor(" & _ range("e11:b12").Address & ",34,FALSE)" -- Regards, Tom Ogilvy "Don Guillett" wrote in message ... try ActiveCell.Interior.ColorIndex = 34 Range("G4").Formula= "=countbycolor(range("e11:b12"),34,FALSE)" -- Don Guillett SalesAid Software "Chris" wrote in message ... The following is some VBA code being run using a Macro. ActiveCell.Select Selection.Interior.ColorIndex = 34 Range("G4").FormulaR1C1 = "=countbycolor(Belmarsh,34,FALSE)" End Sub "Belmarsh" is a cell range. Is there any way of inputting a cell specific cell range i.e. E11:B12 or $E$11:$B$12 in VBA. Whenever I try this it errors. Any ideas?? Thanks Chris |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|