Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
subtracting column from column
I am trying to get the value from one cell while in another. If I am at "C6"
(I have this in a variable) I need to know how to get the value from "A6". How do I do this? -- Regards Rick XP Pro Office 2007 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
subtracting column from column
The cell I get information from will always be different, reading cell.value
from column "A" dependant on cell.address (row) of any other cell. -- Regards Rick XP Pro Office 2007 "Rick S." wrote: I am trying to get the value from one cell while in another. If I am at "C6" (I have this in a variable) I need to know how to get the value from "A6". How do I do this? -- Regards Rick XP Pro Office 2007 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
subtracting column from column
msgbox cells(activecell.row,1)
-- Don Guillett Microsoft MVP Excel SalesAid Software "Rick S." wrote in message ... The cell I get information from will always be different, reading cell.value from column "A" dependant on cell.address (row) of any other cell. -- Regards Rick XP Pro Office 2007 "Rick S." wrote: I am trying to get the value from one cell while in another. If I am at "C6" (I have this in a variable) I need to know how to get the value from "A6". How do I do this? -- Regards Rick XP Pro Office 2007 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
subtracting column from column
there's a couple of ways. If you want C6 to equal A6 value then:
Cells(6, 3) = Cells(6, 1) Or Cells(6, 3) = Cells(6, 3).Offset(0, -2) If you just want to capture the value then use a variable: myVar = Cells(6, 1).Value Those are all VB code. If you are in Excel and using formulas then in Cell C6 you put: = A6 You can use the Offset method to move around the sheet while using a variable value like: For i = 1 To Rows.Count For x = 1 To Columns.Count Cells(6, 3) = Cells(i, x) Next x Next i Since the answer is that simple, I must not be answering your real question, Right? "Rick S." wrote: I am trying to get the value from one cell while in another. If I am at "C6" (I have this in a variable) I need to know how to get the value from "A6". How do I do this? -- Regards Rick XP Pro Office 2007 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Subtracting ONLY the last value in a column | New Users to Excel | |||
Column sum incorrect upon subtracting | Excel Discussion (Misc queries) | |||
Subtracting figures in a column | New Users to Excel | |||
Adding or subtracting numbers from a column | Excel Discussion (Misc queries) | |||
Subtracting two Subtotals in the same column | Excel Discussion (Misc queries) |