Ask Your Question
1

Show cell depending on other cell

asked 2012-07-23 14:12:08 +0200

anonymous user

Anonymous

Hi all,

I've 3 (A, B,C) columns with data. In the 4th column (D) i want to select a column by entering A, B or C. With a formule the correct column should be displayed in E. But .. i can't figure it out how to do it :-(

Like this:

A B C D E

1 2 3 B 2

4 5 6 A 4

7 8 9 C 9

delete close flag offensive retag edit

2 Answers

Sort by » oldest newest most voted
1

answered 2012-07-23 14:28:03 +0200

tohuwawohu gravatar image tohuwawohu flag of Germany
1812 13 40

updated 2012-07-23 14:39:20 +0200

Use this formula in E1 and copy it down to other rows as required.

=INDIRECT(CONCATENATE(D1,ROW(D1)))

This formula creates a string from the content of cell D1 and the current row number (using function ROW). This string is passed to the INDIRECT function. It returns a reference based on a text string.

So, the CONCATENATE functions "calculates" the string "B1", and the INDIRECT function reads the content of cell "B1" as output of the complete formula.

EDIT: Depending on your local settings, you may need to use a comma "," instead of a semicolon ";" as separator in the CONCATENATE function:

image description

link delete flag offensive edit
0

answered 2012-07-23 14:35:36 +0200

matthijs gravatar image matthijs
3 2 5

Thank you very much! Your solution is working

In my case it was =INDIRECT(CONCATENATE(H12;ROW(H12))) (a ; instead of , ).

link delete flag offensive edit

Comments

yes, comma or semicolon as function separator depends on the localisation settings.

tohuwawohu ( 2012-07-23 14:38:51 +0200 )edit

Login/Signup to Answer

Donate

LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-07-23 14:12:08 +0200

Seen: 112 times

Last updated: Jul 23 '12