开发者

excel data same row

开发者 https://www.devze.com 2022-12-15 09:20 出处:网络
I\'m trying to write an Excel Function that grabs the data out of a neighboring cell in the same row. What is the proper function to do this? I\'ve been searching for hours and ca开发者_如何学Pythonnn

I'm trying to write an Excel Function that grabs the data out of a neighboring cell in the same row. What is the proper function to do this? I've been searching for hours and ca开发者_如何学Pythonnnot find it.

Thank you!!!


The question is answered in this thread: Self-reference for cell, column and row in worksheet functions

To get the data of a cell in the same row left to your cell you can use:

=INDIREKT(ADRESSE(ZEILE(); SPALTE()-1))

(German Excel)

=INDIRECT(ADDRESS(ROW(), COLUMN()-1))

(English Excel, not tested)


If you're trying to grab info in column A and maybe multiply it by something in column B in your B cell you would do:

=A1*2

Is this what you're talking about? This seems maybe too straightforward...

EDIT Try this:

=$A1*2

and then drag the little square in the lower right corner of the cell down as many rows as you need.


I know this was written over 2 years ago but I was as frustrated as you were when I couldn't so I thought I'd post it here. All you do is put a dollar sign ($) in front of the row or column that you want to reference. So, for example if you wanted to get data from column C but using varying rows, you would write it like this:

$C1

It's called a mixed cell reference. Source: Introducing Excel Formulas


Perhaps Offset would suit: http://www.techonthenet.com/excel/formulas/offset.php

0

精彩评论

暂无评论...
验证码 换一张
取 消