Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA Newbie, Positioning according to R1C1 format

I am totally new to Excel VBA.
I have a Sheet1 containing Row number, Column number, and value(3columns).
For example,
Row number Column Number Value
----------- -------------- --------
2 6 23.1
4 13 31.9
6 4 51.0
.........
and so on.

I wish I could relocate the values(23.1, 31.9, 51.0... ) to the
corresponding cells(R1C1 format) on another sheet, for example, Sheet2 of
the same Excel book.
For example(Sheet2)
1 2 3 4 5 6 7 8 9 10 11 12 13
1
2 23.1
3
4
51.0
5
6 51.0
....

Would there be any elegant VBA program for doing this instead of Excel
function methods?

I really appreciate your help or suggestions to this.

Jong


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA Newbie, Positioning according to R1C1 format

Dear all,

Sorry for my typo in the example(Sheet2). On the Row4 and Column 13, '31.9'
should have been placed instead of '51.0.'

Thanks in advance,

Jong

"Jong" wrote in message
...
I am totally new to Excel VBA.

...........
corresponding cells(R1C1 format) on another sheet, for example, Sheet2 of
the same Excel book.
For example(Sheet2)
1 2 3 4 5 6 7 8 9 10 11 12 13
1
2 23.1
3
4
51.0
5
6 51.0
...





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA Newbie, Positioning according to R1C1 format

Dear gurus,


I will appreciate it if you could give me any hints or key expressions for
the VBA program needed for completing this work.

Thanks in advance.
Jong

"Jong" wrote in message
...
Dear all,

Sorry for my typo in the example(Sheet2). On the Row4 and Column 13,

'31.9'
should have been placed instead of '51.0.'

Thanks in advance,

Jong

"Jong" wrote in message
...
I am totally new to Excel VBA.

..........
corresponding cells(R1C1 format) on another sheet, for example, Sheet2

of
the same Excel book.
For example(Sheet2)
1 2 3 4 5 6 7 8 9 10 11 12

13
1
2 23.1
3
4
51.0
5
6 51.0
...







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default VBA Newbie, Positioning according to R1C1 format

How about:

Option Explicit
Sub testme01()

Dim fromWks As Worksheet
Dim toWks As Worksheet

Dim FirstRow As Long
Dim LastRow As Long
Dim iRow As Long

Set fromWks = Worksheets("sheet1")
Set toWks = Worksheets("sheet2")

With fromWks
FirstRow = 2 '
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

On Error Resume Next
For iRow = FirstRow To LastRow
toWks.Cells(.Cells(iRow, "A").Value, .Cells(iRow, "B").Value) _
= .Cells(iRow, "C").Value
If Err.Number < 0 Then
MsgBox "error with row: " & iRow
Err.Clear
End If
Next iRow
On Error GoTo 0
End With

End Sub

Jong wrote:

Dear gurus,

I will appreciate it if you could give me any hints or key expressions for
the VBA program needed for completing this work.

Thanks in advance.
Jong

"Jong" wrote in message
...
Dear all,

Sorry for my typo in the example(Sheet2). On the Row4 and Column 13,

'31.9'
should have been placed instead of '51.0.'

Thanks in advance,

Jong

"Jong" wrote in message
...
I am totally new to Excel VBA.

..........
corresponding cells(R1C1 format) on another sheet, for example, Sheet2

of
the same Excel book.
For example(Sheet2)
1 2 3 4 5 6 7 8 9 10 11 12

13
1
2 23.1
3
4
51.0
5
6 51.0
...






--

Dave Peterson

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
Macro not recording in R1C1 format StarryEyes Excel Discussion (Misc queries) 0 September 4th 08 10:25 PM
Question on this conversion code switching between r1c1 to A1 format tia sal2 temp Excel Worksheet Functions 1 September 16th 07 06:54 AM
Question on this conversion code switching between r1c1 to A1 format tia sal2 temp Excel Discussion (Misc queries) 2 September 14th 07 08:58 PM
Question on this conversion code switching between r1c1 to A1 format tia sal2 temp Excel Worksheet Functions 2 September 14th 07 08:58 PM
R1C1 format using a variable? jim37055 Excel Discussion (Misc queries) 3 October 4th 05 05:47 PM


All times are GMT +1. The time now is 11:05 AM.

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"