Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Assigning Variable Range

nrow = 8, so rrow = 5
but the below is not working -- What's wrong?

..... *** code **
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-rrow]C:R[-1]C)" <<< PROBLEM
Range("A2").EntireRow.Delete
Range("A1").Select

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 468
Default Assigning Variable Range

never mind, just tried the below, which worked..

ActiveCell.FormulaR1C1 = "=SUM(R[-" & rrow & "]C:R[-1]C)"

"JMay" wrote:

nrow = 8, so rrow = 5
but the below is not working -- What's wrong?

.... *** code **
nrow = Range("A65536").End(xlUp).Row + 1
rrow = nrow - 3
rrow = CInt(rrow)
Range("A" & nrow).Select
ActiveCell.FormulaR1C1 = "=SUM(R[-rrow]C:R[-1]C)" <<< PROBLEM
Range("A2").EntireRow.Delete
Range("A1").Select

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
Problems with assigning range of cells to display chart Richard Flame Charts and Charting in Excel 3 July 3rd 06 02:52 PM
from Range variable Marina Limeira Excel Discussion (Misc queries) 0 January 22nd 06 02:35 PM
Extracting unique entries and assigning it to a named range Hari Excel Discussion (Misc queries) 0 December 13th 05 06:29 AM
Assigning scores to a date range Koen Excel Worksheet Functions 1 October 20th 05 12:37 PM
Assigning ranges for values (e.g., $1,005 the range is ">$1K to 5K jennifer Excel Worksheet Functions 1 August 11th 05 02:09 PM


All times are GMT +1. The time now is 10:07 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"