#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default explanation

Can someone please tell me what this function does. Especially the
"Cells(mycell.Row,4).value = ""

Secondly, what is the association between (mycell.Row, 4) and
Range(N6:N31)

For Each mycell In Range("N6:N31")
'' If mycell.Value n Then
'' Cells(mycell.Row, 4).Value = ""
'' Cells(mycell.Row, 5).Value = ""
'' End If

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default explanation

It is looping through N6:N31 a cell at a time, mycell points at the current
cell in each iteration of the loop.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ssrvant" wrote in message
ups.com...
Can someone please tell me what this function does. Especially the
"Cells(mycell.Row,4).value = ""

Secondly, what is the association between (mycell.Row, 4) and
Range(N6:N31)

For Each mycell In Range("N6:N31")
'' If mycell.Value n Then
'' Cells(mycell.Row, 4).Value = ""
'' Cells(mycell.Row, 5).Value = ""
'' End If



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default explanation

Yes, the supplied code is attempting to set the values of the cells in the
range N6:N31 to be empty. That is, to contain the null string ".
The VBA function "Cells" allows the user to specify a cell on the sheet
using row and column referencing. The 4 and 5 refer to column 4 and column 5.
The following line
For Each mycell In Range("N6:N31")
is the VBA method for iterating through an a range object.
The "mycell" variable has unfortunately not been defined. You could replace
the "mycell" variable with "activecell".
Hope that suffices!
Aran Black

"ssrvant" wrote:

Can someone please tell me what this function does. Especially the
"Cells(mycell.Row,4).value = ""

Secondly, what is the association between (mycell.Row, 4) and
Range(N6:N31)

For Each mycell In Range("N6:N31")
'' If mycell.Value n Then
'' Cells(mycell.Row, 4).Value = ""
'' Cells(mycell.Row, 5).Value = ""
'' End If


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default explanation

On Oct 31, 12:42 pm, "Bob Phillips" wrote:
It is looping through N6:N31 a cell at a time, mycell points at the current
cell in each iteration of the loop.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"ssrvant" wrote in message
thank you.
ups.com...

Can someone please tell me what this function does. Especially the
"Cells(mycell.Row,4).value = ""


Secondly, what is the association between (mycell.Row, 4) and
Range(N6:N31)


For Each mycell In Range("N6:N31")
'' If mycell.Value n Then
'' Cells(mycell.Row, 4).Value = ""
'' Cells(mycell.Row, 5).Value = ""
'' End If



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
Would like an explanation of a formula: Leo New Users to Excel 4 November 9th 07 03:52 PM
Explanation please Mekinnik Excel Programming 2 October 31st 07 03:10 PM
FORMULA EXPLANATION SSJ New Users to Excel 7 July 26th 07 07:03 PM
Need an explanation JLGWhiz Excel Programming 2 June 15th 07 08:13 PM
Explanation of when & how to use ( ) { } : ; , ! etc? Paul (Sydney Australia) New Users to Excel 4 May 2nd 07 01:54 AM


All times are GMT +1. The time now is 07:43 PM.

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"