how do i use the R[]C[] notation in visual basic, for example to .

Trying to write a macro... want certain value to be assigned to cells on 
different rows according to a counter, so would be useful to use the R[]C[] 
notation to assign a value to a cell.
I can use for example
 cell("D3").value = 5 
But how would I write something like
cell(R[3]C[4]).value = 5
The compiler rejects the example above... what is the right way of using the 
Row/Column notation in Visual Basic for Excel?
0
pacheco (1)
10/6/2004 7:59:06 PM
excel.charting 18370 articles. 0 followers. Follow

1 Replies
512 Views

Similar Articles

[PageSpeed] 27

You can use the Cells property:

       Cells(3, 4).Value = 10


pacheco wrote:
> Trying to write a macro... want certain value to be assigned to cells on 
> different rows according to a counter, so would be useful to use the R[]C[] 
> notation to assign a value to a cell.
> I can use for example
>  cell("D3").value = 5 
> But how would I write something like
> cell(R[3]C[4]).value = 5
> The compiler rejects the example above... what is the right way of using the 
> Row/Column notation in Visual Basic for Excel?


-- 
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

0
dsd1 (5911)
10/6/2004 8:09:20 PM
Reply:

Similar Artilces:

Which financial formula do I use?
If I have a lump sum of money and I wish to use 4% of it a year. And each year I'll increase my withdrawal to keep up with inflation. Which financial formula do I use? Is it NPV? If so do I add the lump sum as a negative number or do I add it at the end of the formula as a +? If a financial formula is not the answer, how do I set up a spreadsheet? Thank You Ted ...

Does Microsoft Headquarters use a separate Dongle Key than Store O
Sorry for the silly question- Andrea Yes, each store Op has a key and the HQ has its own, very annoying to keep it on the computer, trying not to lose it, and most of all, if it is removed once, it has to be installed again. Which means if your salesperson removed by mistake or some kid came behind the register and took it as a toy, you're doomed! :( "Andrea" wrote: > Sorry for the silly question- > Andrea Thanks for the answer. It sounds like a pain! :) Andrea "kay" wrote: > Yes, each store Op has a key and the HQ has its own, very annoying to ke...

Visual Studio 2005 with SP1 and Vista Patch in VISTA OS
Hello I have an application which loads the Property Pages from another DLL. In First Propertypage I have a timer which runs every 5000/1000 mille seconds and query USB port to find one of the status of unit connected. If I build this application in Visual Studio 2003 (installed in XP) and run the binary in Vista it works fine. If I build this application in VS2005 with Sp1 & Vista patch installed in Vista Machine, I get an assert. When I debug the application, in one place there is a comment from Microsoft (Windows code) "Warning: Creating dialog from within a COleControlModul...

'Closing' chart window *and* removing chart using VBA
Hello, When an embedded chart is in its window, clicking the 'X' of the window merely removes the window but does not remove the chart (chart object). Is there a way to remove/delete the chart when clicking on the 'X'? In other words, can an an event of some sort that recognizes the Window becoming invisible, be used delete the chart? Would this sort of this be solved with Windows handles and APIs...? Thanks/Cheers. Marc R. Bertrand I suspect that you can probably do what you want with some amount of event / Win API programming. However, as pointed out in the response t...

Error: Call Stacks in Use
Hello, Great Plains Dynamics 6.00g52. When entering a new Journal transaction (Transactions -> Financial -> General) an error message appears stating, "All call stacks are in use. Cannot start script." Clicking ok allows access to the window, but details cannot be entered. Note that this occurs only on 1 client pc. All others seem to be able to do it just fine. That pc is a fairly new dell laptop running windows xp sp2. It is an english laptop, but Japanese has been enabled. I searched customersource but found nothing. Anybody have any ideas? -Trevor Hi Are y...

Use Outlook to Administer the Global Address List
This is a multi-part message in MIME format. ------=_NextPart_000_0015_01C56DCF.F8272520 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to use Outlook 2003 to administer an Exchange 2003 Global = Address List? If yes, how. Thanks in advance. --=20 D. Lewis "Just trying to keep life simple." ------=_NextPart_000_0015_01C56DCF.F8272520 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&g...

Money 2005 'C' Column
I have several bank accounts that I track on my computer using Microsoft Money 2005; I store the data online, so that it can be accessed and edited by two users. A co-worker also uses the same data online; the deposits and checks written show up correctly, no matter which of us has entered the information. What does not show up is an entry in the reconciliation column. The reconciliation is done on my system. Then, the entries that are marked with a “C,” don’t display a “C” for my co-worker. She can never tell which entries have cleared the bank. It is a puzzle why all the informa...

vessel PC use GP connecting to onshore office using GP Server
What will be the best idea to connect vessel PC using GP 9.0 to our on shore office regarding of 1. Vessel use satellite connection (fleet 77) 2. Speed will be 64kpps 3. The connection will be cost per minutes Why Microsoft does not have business solution for shipping and vessel companies. Like software handling all Vessel companies business. Thank you for your support ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you...

CRM Online reports seem too basic
We're having problems with reports in CRM Online. We need a report that would give a count of "All the Accounts where StatusStage = Target and HealthSystem IS NOT BLANK", plus another count of "All the Accounts where StatusStage = Target and HospitalPartner IS NOT BLANK", plus another count of "All the Accounts where StatusStage = Target and DevelopmentRep IS NOT BLANK". If this was Crystal Reports, each of those would be a field with a formula. How do we do something like this in CRM Online? Thanks, Lon ...

Suggestion
Suggestion to Microsoft. Make a new section in the Access Discussion groups for Templates & Example Databases. Such questions are inherently different than the other sections (I.E. the poster invariably either wants to find the DB done already, or want's a responde to look at a database that is neither the poster's nor responder's database. So such questions are invariably misplaced in any other section that they are posted in. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the m...

DST Update
Does the system that I conduct the DST update from need to be on the domain that has exchange installed or can I connect to it from a remote system using RPC over HTTPs? Or will that just end up prompting me for credentials for each mailbox? It will prompt. Best to be on the domain and use Outlook in online (not Cached Mode) mode using TCP/IP (not RPC over HTTP). -- Bharat Suneja MVP - Exchange www.zenprise.com NEW blog location: exchangepedia.com/blog ---------------------------------------------- "Garrett Felix" <Neo@newsgroup.nospam> wrote in message news:F75E7D...

How can I resume a download if the user gets disconnected (I am using CHTMLfile )?
How can I resume a download if the user gets disconnected (I am using CHTMLfile )? I use Seek() but I think that isnt good idea, becouse when I want to set a start point, Seek goes to exeption In the bottom is my code thanks for any kind of help if (!destFile.Open(pFileName, CFile::modeWrite | CFile::shareExclusive | CFile::modeNoTruncate, &ex)) { destFile.Open(pFileName, CFile::modeWrite | CFile::shareExclusive | CFile::modeCreate, &ex); dwLength = 0; } else { dwLength = destFile.GetLength(); } CInternetSession *pHttpSess...

Using Group Policy to control Outlook security/attachments behaviour
Hi Are there any easy instructions on how to set Outlook 2007 security via group policy settings? Many Thanks Regards "John" <info@nospam.infovis.co.uk> wrote in message news:O8disCWvKHA.6140@TK2MSFTNGP05.phx.gbl... > Are there any easy instructions on how to set Outlook 2007 security via > group policy settings? This question isn't clear enough. There are multiple security features in Outlook. Which one(s) are you trying to control? What happens now and what would you like to happen? Exchange account? -- Brian Tillman [MVP-Outloo...

using stationery fonts
I am a relatively new user of Outlook 2003. I chose a stationery to use for my outgoing messages, but when I type messages, the font associated with the stationery is not the default. I have checked the boxes to tell Outlook to use the font associated with the stationery, but it still defaults to Times New Roman instead of Tempus Sans. Any suggestions? ...

how to add a combo box in to a excel cell using VBA dynamically?
Hi All, I am trying to use a excel grid control and I need to a add a combo box in to a cell dynamically, in an Add-In. Please provide me a VBA sample code which I can use for this. Regards Gamini ...

Help with Excel formulas
I have created pivot tables for monthly sales figures, however i want t create a formula that will insert the figure for jan and consecutiv months in the month boxes on sheet 6 for each country and so on. The I want to be able to create a formula to how well each country eac performing month on month against there individual targets as percentage and as a figure. Can anyone help please Attachment filename: pots update weekending (temp).xls Download attachment: http://www.excelforum.com/attachment.php?postid=42190 -- Message posted from http://www.ExcelForum.com It is not apparen...

can powerpoint be used in a podcast?
I want to make a podcast of my voice giving a powerpoint presentation, but I'm not sure how to make my voice track match with the images. I've been using garageband to do this in the past and want to give it a go on my own computer, which doesn't have garageband. I have audacity - but I don't think there is a way to use my powerpoint in audacity. ...

C#.net read word doc from byte[]
Hi All, I'm trying to read the text from a word document and display it in a RichTextBox using C#.net. The Word document is stored in a SQL Server 2008 database using FILESTREAM. when i read back the data from the table i get the document in a byte array - how do i get the text from the byte array??? There are loads of articles online about how to read from a document on your file system - which is of no use to me as i have it in a byte format. Does anybody here have any ideas how to read from a byte array or a memory stream?? Thanks Dale I don't think there is ...

Help! Server 2003 exchange <-> Outlook 2000? using exchange?
I have just installed a windows server 2003 machine. Is there a way to get users running outlook 2000 to read mail from exchange? The Add Account feature in outlook 2000 does not have exchange as an option. users with outlook 2002 are set up fine. Thanks for any help! Doug You must be using Outlook 2000 in Corporate or Workgroup mode to be able to connect to Exchange. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. "Doug" <anonymous@d...

Syntax for using a variable as part of an object name.
I have 10 cells named UI1 through UI10. I want to put data into the cells through a For loop. What is the proper syntax to use a variable as part of the object name? In the sample below, CELL1 is a variable whose value is the name of the field where I want to enter data. I need to have VB recognize the value of the variable as the field name. Dim Cell1, DATA1 as variant Dim x as integer <DATA1 - calculated > For x = 1 to 10 CELL1 = "UI" & x RS.Edit RS!CELL1 = Data1 -- Error - What is the proper syntax? RS.Update <Change ...

How create a field where the nickname is used instead of the first
I want to create a field where the nickname is used instead of the firstname if there is a nickname - but use the first name if there is no nickname. Here's what I'm working with: Expr1: [tContacts_2.CFirstName]+"" & [tContacts_2.CNickname] Thanks, John On Sat, 2 Feb 2008 14:21:00 -0800, jmuirman wrote: > I want to create a field where the nickname is used instead of the firstname > if there is a nickname - but use the first name if there is no nickname. > > Here's what I'm working with: > > Expr1: [tContacts_2.CFirstName]+"" ...

Using Excel OS 9 to connect to a WAN data source
Hi All Sorry for the cross-post, but I'm in a real pickle. Basically I have Excel/Query 98 running on a Mac OS 9 machine with Microsoft's Merant ODBC 3.5.1 software patch as the ODBC connectivity software. If I try to connect the above locally (ie using the LAN) to an SQL 2000 DB on my Win2000/SQL 2000 server, Excel/Query connects in seconds after I enter the password and shows me the Query layout from which I can pick my tables. However if I go into my ODBC DSN and change the Server Name and Server Address to the WAN ip of my Win2000/SQL 2000 server, Excel/Query seems to freeze fo...

#VALUE! result when using defined name in formula
I am learning how to name cells and use these names. I tried to name a cell in my Summary sheet using the sum of cells in my Detail sheet. When I press enter, the cell returns a #VALUE! What am i doing wrong? Trina That means there's a #VALUE! error in your sum range. Go check & clean it up, the sum should work fine -- Max Singapore --- "Tacrier" wrote: > I am learning how to name cells and use these names. > > I tried to name a cell in my Summary sheet using the sum of cells in my > Detail sheet. When I press enter, the cell returns ...

Connecting to a network drive using VBA
Hi, I would like to call a excel file which is actually stored in a network. There are two networks which i want to connect, one is controlled by user account and the other is a open one. Can anyone please help me to write a code which will either connect to the network drive by getting the username/password or by anyother way of directly calling the network folder probably using FileSystemObject library. Its ok even if it has to connect a drive to the network path. But would be useful if you tell me how to remove this within the code!! For Eg: the network path would look like \\10.10...

High CPU use
Hello, I'm using Outlook 2002 SP2 that connects to Exchange Server 5.5SP4 The mailbox size is about of 1400Mo. When i use Outlook, the CPU use is about 90%. Any idea to correct this problem? Best regards, Jerome ...