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

I've a problem and no clue how to solve this.
I've a table with 3 columns (A:C). Column A is contains a name (sheetname),
column B a cell (C20) and column C a value.

I want to value of C1, in the cell of B1 on sheet A1 and so on, till the end
of the table. I was struggling with the loop (end of table / end of range?).

Example of table:
ColumnA-ColumnB-ColumnC
sheet1-C20-Jan
sheet2-B20-Karin
sheet1-C21-Doug
etc.

Thanks for your help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 139
Default problems with loop

Arjan:

try,

i = 1
Do While Sheet1.Cells(i, 1) < ""
shtname = Sheet1.Cells(i, 1)
Worksheets(shtname).Range(Sheet1.Cells(i, 2)) = _
Sheet1.Cells(i, 3)
i = i + 1
Loop

--
天行健,君*以自強不息
地勢坤,君*以厚德載物

http://www.vba.com.tw/plog/


"Arjan" wrote:

I've a problem and no clue how to solve this.
I've a table with 3 columns (A:C). Column A is contains a name (sheetname),
column B a cell (C20) and column C a value.

I want to value of C1, in the cell of B1 on sheet A1 and so on, till the end
of the table. I was struggling with the loop (end of table / end of range?).

Example of table:
ColumnA-ColumnB-ColumnC
sheet1-C20-Jan
sheet2-B20-Karin
sheet1-C21-Doug
etc.

Thanks for your help!

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
So close! Problems with Loop Linking to specific cells in pivot table Excel Programming 3 February 7th 05 05:28 PM
for next loop problems cliee Excel Programming 3 November 1st 04 12:05 PM
Loop code problems pauluk[_51_] Excel Programming 2 April 23rd 04 10:30 AM
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 01:12 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"