Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Loop code problems

Hi, i am using the following code to place the letters EA in column
for some reason it places it in colum n o p q r s? Can so one help

the code am using is

set myrange = Application.Selection
for each cell in myrange
cell.offset(0,13).Value="EA"
Nex

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Loop code problems

Hi
depends on your selection as you use offset for this. try
replacing the line
cell.offset(0,13).Value="EA"

with
cells(cell.row,"N").value = "EA"

-----Original Message-----
Hi, i am using the following code to place the letters EA

in column N
for some reason it places it in colum n o p q r s? Can so

one help

the code am using is

set myrange = Application.Selection
for each cell in myrange
cell.offset(0,13).Value="EA"
Next


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Loop code problems

Hi, i am using the following code to place the letters EA in column N
for some reason it places it in colum n o p q r s? Can so one help

the code am using is

set myrange = Application.Selection
for each cell in myrange
cell.offset(0,13).Value="EA"
Next


for example:
Cells(cell.Row, "N").Value = "EA"

or:
cell.Offset(0, 13 - cell.Column).Value = "EA"


--
Regards

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)

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
Excel Macro loop problems mibsaweiss Excel Discussion (Misc queries) 0 March 16th 06 04:45 PM
Loop for VBA code? paulinoluciano Excel Worksheet Functions 5 December 28th 05 01:30 PM
How to Loop some code Phil Osman Excel Discussion (Misc queries) 2 August 19th 05 11:14 AM
VB for excel, how do I loop through code steve hobden via OfficeKB.com Excel Discussion (Misc queries) 2 June 9th 05 01:59 PM
If... Then Loop problems in Worksheet Event TB[_3_] Excel Programming 2 August 4th 03 08:45 AM


All times are GMT +1. The time now is 08:51 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"