Home |
Search |
Today's Posts |
#1
|
|||
|
|||
My New Macro from Bernie
I posted this earlier today but I don't see it on this site. So I will try
Again. If I change Range("J34") to Range("J32") do I need to change myCell(1,13) to something else? What do the numbers in myCell(1,13)? Thanks Julian |
#2
|
|||
|
|||
Posted to newsgroup and sent privately.
Julian, No, you should not change the myCell(1, 13) part of the code. The myCell(1,13).Value means to pick up the value from the same row as the name currently being processed, out of the 13th column (M) There are many ways to address ranges or cells in Excel. I could have referred to that cell by using: myCell.Item(1,13).Value (myCell(1,13) is a shortcut for the Item property) Worksheets("Balances").Cells(myCell.Row,13).Value Worksheets("Balances").Range("M" & myCell.Row).Value myCell.Offset(0,12).Value The advantage of using myCell is that defined range objects don't require the worksheet to be identified since they are associated with a specfic worksheet. But that's too much for a beginning coder to learn or need to know - just be happy if you get the code to work. HTH, Bernie MS Excel MVP "JulianB" wrote in message ... I posted this earlier today but I don't see it on this site. So I will try Again. If I change Range("J34") to Range("J32") do I need to change myCell(1,13) to something else? What do the numbers in myCell(1,13)? Thanks Julian |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) | |||
Help with macro formula and variable | Excel Worksheet Functions | |||
Macro and If Statement | Excel Discussion (Misc queries) | |||
Macro Formula revision? | Excel Worksheet Functions |