Set a range from a variable location

I am using a loop function that will eventually select and activate a 
specific cell known as "TheCurrentCell."  Once I reach that location I want 
to use that coordinate as the upper left area of a new range.  Supposing that 
the end cell of my range is D1000, the Range selection would be something 
like Range(TheCurrentCell:D1000).select, however, I don't know the correct 
syntax to make this happen.

Please help.  Thank you.
0
User (142)
11/26/2005 11:55:02 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
273 Views

Similar Articles

[PageSpeed] 56

Use something like Range(Selection.Address & ":D1000").Select.

"Troubled User" wrote:

> I am using a loop function that will eventually select and activate a 
> specific cell known as "TheCurrentCell."  Once I reach that location I want 
> to use that coordinate as the upper left area of a new range.  Supposing that 
> the end cell of my range is D1000, the Range selection would be something 
> like Range(TheCurrentCell:D1000).select, however, I don't know the correct 
> syntax to make this happen.
> 
> Please help.  Thank you.
0
11/27/2005 12:00:02 AM
Thank you.  It worked!!

"bpeltzer" wrote:

> Use something like Range(Selection.Address & ":D1000").Select.
> 
> "Troubled User" wrote:
> 
> > I am using a loop function that will eventually select and activate a 
> > specific cell known as "TheCurrentCell."  Once I reach that location I want 
> > to use that coordinate as the upper left area of a new range.  Supposing that 
> > the end cell of my range is D1000, the Range selection would be something 
> > like Range(TheCurrentCell:D1000).select, however, I don't know the correct 
> > syntax to make this happen.
> > 
> > Please help.  Thank you.
0
11/27/2005 12:05:02 AM
Reply:

Similar Artilces:

Forms.dic location
I am going to be writing some custom code for GP. Currently forms.dic is in a central location on the server but dynamics.dic is on each workstation. My first question is when you look at the "Edit launch window" the default forms.dic location is blank but when you click on the browse button it comes up on the server location where forms.dic is located. Is this just a bug and it always shows blank even if it's been changed? My second question is how much better performance will I get if I locate forms.dic on each workstation. My thought on that would be I could write a l...

asking for password when I didn't set it up
I had Microsoft Money 98 on my computer. My computer broke and I got a laptop with a newer version. I applied my backup to the newer version with no problems. When I got my other computer running and tried to put my backed up data onto the 98 version it would not allow it. I then downloaded a trial version of 2004 onto my computer and it allowed me to use my backup. The trial version expired and I decided the 98 worked just fine for now. I spoke to a support person from Gateway who told me to uninstall the trial version and reinstall my 98 version and my data would all come ba...

How To Set BCC?
New email messages in my Outlook 2002, SP-2 has boxes for "To" and "CC." I'd like to add a "BCC" box. How do I do this? In a new message: go to view, BCC Field. Larry Bohen wrote: > New email messages in my Outlook 2002, SP-2 has boxes for "To" and > "CC." I'd like to add a "BCC" box. How do I do this? In the new message, click View, BCC Field. "Larry Bohen" <lbohen@audiobooksonline.com> wrote in message news:vh8gtsfdju2fb8@corp.supernews.com... > New email messages in my Outlook 2002, SP-2 h...

Range name confusion
I'm using Excel XP. I have a general question regarding range names. Suppose I have the following in a spreadsheet: Qty Price Sales 5 .75 =Quantity*Price 7 .80 =Quantity*Price 3 .50 =Quantity*Price .. .. etc. The first column is named "Quantity" and the second is named "Price". Column 'C' contains the formula "Quantity*Price". When I type the formula in 'C1' and copy it down, the formula works correctly, multiplying each value in column 'A' with the corresponding value in column &#...

location of data storage area
Hi, I have WinXP Home and Outlook Express 6. I recently had to re-install Windows which left all my directory structures and data intact. However, my Outlook Express data seems to have been wiped, along with my address book, which stupidly I forgot to backup. I created a different user account when reinstalling XP. I thought my outlook data would all still be intact under "docs and settings" but I can't find it. Does anyone know the path to the data files for Outlook Express on Win XP? Thanks Wrong newsgroup. You are asking about Outlook *EXPRESS*. That's not...

Cannot change Organization Setting in CRM
Hi: I have a problem in MS CRM 3.0. In the "System Setting" of "organization settings", after I change the setting and save, system did not prompt any error message, but system will not save my setting??? When I open the "System setting" again, it is still the old setting. Why? Thanks -- Richard Hi, You need to publish your changes... there's a button for it on the toolbar "Richard Jin" wrote: > Hi: > > I have a problem in MS CRM 3.0. > In the "System Setting" of "organization settings", after I change the ...

workflow manager not opening
I get the following error when trying to open any of the workflow tools ----------------------------------------------------------------------------------------------- An error occurred while loading the organisation's date, time, and number format settings. Those settings are incompatible with the formats already used in Workflow Manager. To sync them, you can make changes to System Settings in the System Customisation area of Microsoft CRM Server. ----------------------------------------------------------------------------------------------- No-one has changed this settings, but our...

Problem setting required/recommended/normal dynamically in forms
I have the following code in a CRM 4.0 (UR2) deployment on the contact form: var QUICKCREATEFORM = 5; var CRM_REQUIRED_LEVEL_NORMAL = 0; var CRM_REQUIRED_LEVEL_RECOMMENDED = 1; var CRM_REQUIRED_LEVEL_REQUIRED = 2; if ( crmForm.FormType != QUICKCREATEFORM ) { var oClient = crmForm.all.new_client; var oRegistrationDate = crmForm.all.new_registrationdate; if (oClient.DataValue == true ) { oRegistrationDate.Disabled = false; crmForm.SetFieldReqLevel("new_registrationdate", CRM_REQUIRED_LEVEL_REQUIRED); crmForm.SetFieldReqLevel("lastname", CRM_REQUIRED_LEVEL_NORMAL); ...

variable range in a macro
I have a worksheet where the number of rows and columns vary each time I process the data. I want to transpose the cols and rows but need to set the range before I copy. There may not be any data in the XY cell. Is there a way to do this in a macro? Thanks for any help. -- Al Hi Al, Assume data starts in A1 and that there is a blank row below, and a blank column to the right, of the data, then your data can be defined by: ActiveSheet.Range("A1").CurrentRegion --- Regards, Norman "AMK" <AMK@discussions.microsoft.com> wrote in message news:2ACC5FE1-...

How to use COUNT using multiple ranges
I need the count of information based on criteria from differen columns. Example of columns: A B C D 0_F JJ 1 II 0_F JD 2 III 0_R JR 1 II 0_F JC 2 II Blank JP 1 III 0_F JK 1 III What is the count IF (Col A)=0_F and IF (Col D)=II I don't know how to combine the information to come up with the resul of 2 Thanks for any help -- Message posted from http://www.ExcelForum.com On 5/9/04 7:38 AM, in article LIZZIE.15zlef@excelforum-nos...

Automated way to discover the structure of the result set of a stored procedure?
Is it possible to write a script that, as its input, takes the name of a stored procedure, and, as its output, produces a table each of whose rows contains the name and data type of each column in the (presumably unique) result set of that stored procedure? I am trying to build a system that can create a set of scripts that can act as a test harness for a given stored procedure. I would like to automate as much of this task as possible. Currently, I am generating scripts that can read sets of parameters stored in a table, invoke the stored procedure for each parameter set (represente...

What settings are needed to print a Publisher two-sided brochure?
I have been trying to print a brochure in Publisher. No matter what settings I use, there is always one side upside-down or the text is flipped, or some other undesirable combination. If there are particular settings that allow my printing to work, please let me know. Thank you very much. Intern <Intern@discussions.microsoft.com> was very recently heard to utter: > I have been trying to print a brochure in Publisher. No matter what > settings I use, there is always one side upside-down or the text is > flipped, or some other undesirable combination. If there are > pa...

How do I set up my own Outlook Email form, with own choice font s
I want to set up an Outlook email form, to appear when I press "New", with my own choice of background, font style, and font size and colour. Can anyone help? For information on customizing the default Outlook forms, see http://www.outlookcode.com/d/forms.htm. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** "billyarrow" wrote: > I want to set up an Outlook email form, to appear when I press "New", with my > own choice of backgro...

Make settings for opening Publisher
How can I open publisher to a 8.5X11 page and skip selecting page size My Publisher, all versions, opens with the standard letter size. Look in the printer folder, see what the default page size is for your printer. -- Mary Sauer http://msauer.mvps.org/ "Randy" <Randy@discussions.microsoft.com> wrote in message news:89CB1B97-6E2A-41B5-8B85-7407BE6A6153@microsoft.com... > How can I open publisher to a 8.5X11 page and skip selecting page size ...

creating a design set/ template
I have created a business card in publisher 2003 and would now like to use the card as a base for other publications such as letterhead, receipts, web site, etc. I have saved the card as a template, but cannot change it to a letterhead, etc. Any help is much appreciated. You'll have to copy/paste the design you created to your other publications. You can save each as a separate template. A template stays a template, you cannot overwrite it. You can open the template; edit the objects and save with a new name. -- Mary Sauer http://msauer.mvps.org/ "Mayan Rey" <MayanR...

Number of subordinates using NESTED SET
Hi all, I'm not an expert in SQL and I need a little help. I'm developing a php script working with a tree stored in database. Looking in Internet I found this article showing a good method for manage a tree using the nested set way: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html The queries showed cover quite all my needs but there only one information I need to know not reported. Starting from the following query used to have the list of immediate subordinates of a node: SELECT node.name, (COUNT(parent.name) - (sub_tree.depth + 1)) AS depth FR...

Redefining the Range for a SeriesCollection
I am working on a project where the size of the range being plotted changes frequently. I want to be able to use VBA to evaluate the Range change and adjust the SeriesCollection/s accordingly. I can do this for embedded (chartobjects) charts, but not stand alone Charts. It seems that I can't make a reference to a range while the chart is activated. IF the chart isn't activated I can't have access to the series collection. Any help would be appreciated. Thank you, David Glotfelty David - Two points. First, I almost always use dynamic charts based on dynamic worksheet ra...

USB Flash Memory PST File Locations
Hi, I searched MS and google but didn't come up with anything. Like so many others, I need a way to get my Outlook data on my notebook and desktop. I can easily fit my data on a USB memory drive and just move it from PC to PC. Is there a downside to keeping outlook data on flash memory? It seems that would be so much simpler than using a third party program. Regards-Michael G. Copying is not a problem, writing directly to the drive has the potential to be a problem. Traditionally, saving directly to a removable drive results in a higher percentage of corrupt files, however, sinc...

Set Personal Options Error
When I try to change an option from the 'Set Personal Options'/Options... menu in the desktop client, I get 'An Error has occurred, contact your system administrator' when I try to click save. I've noticed this happens for some users and not others. No error is logged in the event log. ...

Sum A Named Range Across Multiple Columns
Here's another fun one that's sucked up days of my life with no progress. I have groups of columns representing the days of the week where numbers representing amount of work done (just simple whole number quantities) go. I have every other column named as Budget for the budget of work to be done, and every other column beside those named Actual, for actual work done. So basically on this worksheet, columns A, C, E, G, I, K, etc... all represent the named range Budget (=Sheet2!$A:$A,Sheet2!$C:$C,Sheet2!$E:$E, etc. �), and columns B, D, F, H, J represent the range Actual (=Sheet2!$B:...

how do I set up a chart using data ?
I am having trouble figuring out how to set up a chart using two different data types. I want to plot the sunrise and sunset as lines according to date. The area inbetween the two lines will be the total amount of sunlight in the day. Excel will not let me format the chart the way I imagine it to be (x-axis is date and y-axis is time). Suppose your dates are in col. A starting with A2, the sunrise times in B and the sunset times in C. Ensure A1 is empty (if it is not delete the current content and put it back later). This makes one of the steps below much simpler. Click anywhere in t...

Data Import -> Delimited setting for all data links
Hi all, this is related to my last post about changing all data link paths throughout a workbook. I have a spreadsheet that pulls data from a few hundred data files (.lua) and this data was recently moved. With some help from people here, I was able to write a macro to replace the links to the data with the new links. Sub ChangeConx() Dim intInc As Integer, intInc1 As Integer For intInc = 1 To ThisWorkbook.Sheets.Count With ThisWorkbook.Sheets(intInc) For intInc1 = 1 To .QueryTables.Count With .QueryTables(intInc1) .Connection = Replac...

Formula To Sum Four Highest Numbers In A Range
Is it possible to write a formula to sum the four highest numbers in a range. Example: In row 1 I have 88,83,82,82,78,82,84,84,78. I need a formula that will add just the four highest numbers. Then I will copy it to other rows to do same thing. Thanks, =SUM(LARGE(A1:I1,{1,2,3,4})) Just change the range to suit. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "GTO" <anonymous@discussions.microsoft.com> wrote in message news:108001c3b39f$2a2f22d0$a001280a@phx.gbl... > Is it possi...

Setting Tab Order
I want to control the cells I navigate to when pressing the tab key. I have protected the worksheet and some cells are locked, which are being skipped as I want. However, the only other settings I have been able to find are either tabbing down, then over OR over, then down. Is there a way to set the tab order of specific cells in Excel like you can in Access? Thanks, Shawn One way to explicitly control the exact "next cell of focus" selection, is to select the cells in the desired order of travel, and then preserve this ordered movement by creating a named range. This old post d...

Converting negative numbers in a range of cells to zero
Greetings! How do I create a function that will change a range of cells that are all negative numbers to zero? I want to keep the orginal negative numbers as well. Thank you!!! Use a help column and a formula like =MAX(0,A1) copy down/across, then copy and paste special as values in place Regards, Peo Sjoblom "Dede" wrote: > Greetings! > > How do I create a function that will change a range of cells that are > all negative numbers to zero? I want to keep the orginal negative > numbers as well. Thank you!!! > > In another range use: =MAX(0,A1), w...