LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default named ranges, I think

Can I use named ranges to make my code easier to follow?
What I would like to do is something like this:

rnage("a1").select
lastrow=Range(Selection, Selection.End(xlDown)).Cells.Count
name cells A2 to Alastrow as price
name cells B2 to Blastrow as quantity
name cells C2 to Clastrow as cost

for i=2 to lastrow
cost(i)=price(i)*quantity(i)
next i
This is more meaningful than
cells(i,"c").value=cells(i,"a").value*cells(i,"b") .value

Or is there a better and clearer way to do this?
Thanks
Chris


 
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
named ranges Stout Charts and Charting in Excel 2 March 28th 07 02:17 AM
Named Ranges Shelly Excel Worksheet Functions 1 January 30th 07 10:27 PM
Named Ranges Epinn Excel Worksheet Functions 23 October 16th 06 07:27 AM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Named ranges Ron de Bruin Excel Programming 1 April 20th 04 03:56 PM


All times are GMT +1. The time now is 02:09 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"