Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Newbie: Multiple Cells Range

My coding takes a row number from the InputBox and calls
it RName. Using this RName (row) I want to select 11 cells
on that row to ClearContents. I keep getting a seperator
error and possibly more once I correct that issue. My
coding is as follows:

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is ok)

RName = InputBox ("Enter...")
If RName = 6 Then

ActiveSheet.Cells("RName,10:RName,12:RName,14:.... .. _

RName,30").ClearContents

thanks, Dan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Newbie: Multiple Cells Range


Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is ok)

RName = InputBox ("Enter...")
If RName = 6 Then

for i = 10 to 30 step 2
ActiveSheet.Cells(rName,i).ClearContents
Next
end if

--
Regards,
Tom Ogilvy

"Dan" wrote in message
...
My coding takes a row number from the InputBox and calls
it RName. Using this RName (row) I want to select 11 cells
on that row to ClearContents. I keep getting a seperator
error and possibly more once I correct that issue. My
coding is as follows:

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is ok)

RName = InputBox ("Enter...")
If RName = 6 Then

ActiveSheet.Cells("RName,10:RName,12:RName,14:.... .. _

RName,30").ClearContents

thanks, Dan




  #3   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Newbie: Multiple Cells Range

Thanks Tom, have a good evening. Dan
-----Original Message-----

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is

ok)

RName = InputBox ("Enter...")
If RName = 6 Then

for i = 10 to 30 step 2
ActiveSheet.Cells(rName,i).ClearContents
Next
end if

--
Regards,
Tom Ogilvy

"Dan" wrote in

message
...
My coding takes a row number from the InputBox and calls
it RName. Using this RName (row) I want to select 11

cells
on that row to ClearContents. I keep getting a seperator
error and possibly more once I correct that issue. My
coding is as follows:

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is

ok)

RName = InputBox ("Enter...")
If RName = 6 Then

ActiveSheet.Cells("RName,10:RName,12:RName,14:.... .. _

RName,30").ClearContents

thanks, Dan




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 113
Default Newbie: Multiple Cells Range

another question (Everything below has work).

Using RName (as inputed ROW number) how would I check the
contents of column 2 in that row? If the cell is blank
Then or If the cell has a "Y" Then end.

I used this If statement:

If ActiveSheet.Cells("RName,2")<"" Then
I abort
if the cell is blank then I wany to insert "Y" into cell
("RName,2")


but this is not working. Any suggestions? Thanks.

-----Original Message-----
Thanks Tom, have a good evening. Dan
-----Original Message-----

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is

ok)

RName = InputBox ("Enter...")
If RName = 6 Then

for i = 10 to 30 step 2
ActiveSheet.Cells(rName,i).ClearContents
Next
end if

--
Regards,
Tom Ogilvy

"Dan" wrote in

message
...
My coding takes a row number from the InputBox and

calls
it RName. Using this RName (row) I want to select 11

cells
on that row to ClearContents. I keep getting a

seperator
error and possibly more once I correct that issue. My
coding is as follows:

Dim RName As Integer

On Error GoTo addError (links at bottom of my code &

is
ok)

RName = InputBox ("Enter...")
If RName = 6 Then

ActiveSheet.Cells("RName,10:RName,12:RName,14:.... .. _

RName,30").ClearContents

thanks, Dan




.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Newbie: Multiple Cells Range

If ActiveSheet.Cells(RName,2)<"" Then
Exit sub
else
Activesheet.Cells(RName,2).Value = "Y"
End if

when you put "" around Rname, you turn it into the literal string RName
which is meaningless as an argument to cells.

As shown above, the variable Rname is a place holder for the value the
variable holds which is used when the command is executed. this is what you
want.

--
Regards,
Tom Ogilvy


"Dan" wrote in message
...
another question (Everything below has work).

Using RName (as inputed ROW number) how would I check the
contents of column 2 in that row? If the cell is blank
Then or If the cell has a "Y" Then end.

I used this If statement:

If ActiveSheet.Cells("RName,2")<"" Then
I abort
if the cell is blank then I wany to insert "Y" into cell
("RName,2")


but this is not working. Any suggestions? Thanks.

-----Original Message-----
Thanks Tom, have a good evening. Dan
-----Original Message-----

Dim RName As Integer

On Error GoTo addError (links at bottom of my code & is

ok)

RName = InputBox ("Enter...")
If RName = 6 Then

for i = 10 to 30 step 2
ActiveSheet.Cells(rName,i).ClearContents
Next
end if

--
Regards,
Tom Ogilvy

"Dan" wrote in

message
...
My coding takes a row number from the InputBox and

calls
it RName. Using this RName (row) I want to select 11

cells
on that row to ClearContents. I keep getting a

seperator
error and possibly more once I correct that issue. My
coding is as follows:

Dim RName As Integer

On Error GoTo addError (links at bottom of my code &

is
ok)

RName = InputBox ("Enter...")
If RName = 6 Then

ActiveSheet.Cells("RName,10:RName,12:RName,14:.... .. _

RName,30").ClearContents

thanks, Dan




.

.





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
INTRICATE PROBLEM- How to find multiple text,excluding "H", in a multiple range of cells, then replacing 0 with another number in another cell Tourcat Excel Worksheet Functions 1 February 8th 05 06:26 PM
Newbie stuck on Passing a Variable into a Range Dana DeLouis[_5_] Excel Programming 1 August 13th 03 11:43 PM
Newbie stuck on Passing a Variable into a Range Dave Baranas Excel Programming 0 August 13th 03 07:54 AM
Newbie stuck on Passing a Variable into a Range Bob Kilmer Excel Programming 0 August 13th 03 02:38 AM
Newbie stuck on Passing a Variable into a Range Bob Kilmer Excel Programming 0 August 13th 03 02:20 AM


All times are GMT +1. The time now is 05:41 PM.

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"