Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In a function, how do I reference values in cells offset from the current
cell? For example, I want to concatenate the text in the cells in the two rows above the cell with the function call. Note that the cell containing the function is not necessarily the active cell, so I can't use Activecell to determine it's row/column. I also haven't been able to figure out how to use the Offset function to retrieve the information without also using Activecell. I'm sure this is easy but I just haven't been able to get it. Thanks in advance. CM |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I expect someone will give you advice on OFFSET
However, I would like to point you towards something different For j =1 to 10 Cells(1, j) =2*j Next j will fill A1:J1 with 2,4,6.... Likewise j = 4 Cells(j,1)=cells(j-1,1) & cells(j-1,2) will concatenate A3 and B3 into A4 Just remember it is Cells(row, column); the mnemonic 'RC' might mean something to you. best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "CuriousMark" wrote in message ... In a function, how do I reference values in cells offset from the current cell? For example, I want to concatenate the text in the cells in the two rows above the cell with the function call. Note that the cell containing the function is not necessarily the active cell, so I can't use Activecell to determine it's row/column. I also haven't been able to figure out how to use the Offset function to retrieve the information without also using Activecell. I'm sure this is easy but I just haven't been able to get it. Thanks in advance. CM |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Bernard for the prompt response, but it doesn't really answer my
question. I need to use relative references based on the cell that contains the formula. That could be any cell and is not necessarilty the Activecell. Using your second example for instance, the cell references need to be relative to the cell that contains the formula. "Bernard Liengme" wrote: I expect someone will give you advice on OFFSET However, I would like to point you towards something different For j =1 to 10 Cells(1, j) =2*j Next j will fill A1:J1 with 2,4,6.... Likewise j = 4 Cells(j,1)=cells(j-1,1) & cells(j-1,2) will concatenate A3 and B3 into A4 Just remember it is Cells(row, column); the mnemonic 'RC' might mean something to you. best wishes -- Bernard V Liengme Microsoft Excel MVP http://people.stfx.ca/bliengme remove caps from email "CuriousMark" wrote in message ... In a function, how do I reference values in cells offset from the current cell? For example, I want to concatenate the text in the cells in the two rows above the cell with the function call. Note that the cell containing the function is not necessarily the active cell, so I can't use Activecell to determine it's row/column. I also haven't been able to figure out how to use the Offset function to retrieve the information without also using Activecell. I'm sure this is easy but I just haven't been able to get it. Thanks in advance. CM |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think we (at least, I) need a little clarification on your posting. First,
you have posted in the programming newsgroup, so am I correct in assuming we are talking about VB code? Whether your answer to this question is yes or no, can you give us an example that shows what you have and what you want in the as a result? Rick "CuriousMark" wrote in message ... In a function, how do I reference values in cells offset from the current cell? For example, I want to concatenate the text in the cells in the two rows above the cell with the function call. Note that the cell containing the function is not necessarily the active cell, so I can't use Activecell to determine it's row/column. I also haven't been able to figure out how to use the Offset function to retrieve the information without also using Activecell. I'm sure this is easy but I just haven't been able to get it. Thanks in advance. CM |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Click a cell and all related cells are colour highlighted | Excel Worksheet Functions | |||
How to reference the current total, when it could be Cell H9 or H2 | Excel Discussion (Misc queries) | |||
Relative/Current Cell Reference in Hyperlinks | Excel Discussion (Misc queries) | |||
Relative reference to current cell? | Excel Programming | |||
Reference of current cell | Excel Discussion (Misc queries) |