[Solved] Select specific column in range

Discuss the spreadsheet application
Locked
A.Fish
Posts: 10
Joined: Wed Aug 21, 2019 7:37 pm

[Solved] Select specific column in range

Post by A.Fish »

Hi All,

I am working on a formula that will be utilizing the MATCH function, which it's my understanding takes a single column lookup array. I know that I could simply make a named range covering a single column for the array I am looking to use with this function, but as I already have a multi-column named range that includes the range/column that I am looking to use, I'm wondering if there a way to reference that single column within the larger array.

Example: I have a named range 'Persons' covering cells A3:D40. The information I want to utilize is located in column B. Is there a way to reference only this column while calling the 'Persons' range in my formula?

I was thinking perhaps integrating the INDEX function or something similar, but have been unable to get it to work, so I'm unsure if I am simply doing it wrong or if it's just not possible.

Thanks in advance.
A.Fish
Last edited by A.Fish on Thu Jan 09, 2025 8:54 pm, edited 2 times in total.
Windows 10
OpenOffice 4.1.12
User avatar
Zizi64
Volunteer
Posts: 11505
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Selecting specific column in range

Post by Zizi64 »

Tips:
  • Just name the range B3:B40 as "PersonsB". Then use the name "PersonsB" in your cell functions.
  • Use some lookup function to ge the values from the second column of the "Persons" cellrarange.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Selecting specific column in range

Post by MrProgrammer »

A.Fish wrote: Thu Jan 09, 2025 6:26 pm … formula that will be utilizing the MATCH function … perhaps integrating the INDEX function …
=MATCH(value;INDEX(range;0;2);0) looks for a match of the value in the second column of the range.

If you need any additional assistance attach a spreadsheet demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the spreadsheet itself). I will not help further unless you attach a spreadsheet document. Read about INDEX and MATCH in Help → Index or in User Guides (PDF) or searching for topics about them in the Calc Forum.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
A.Fish
Posts: 10
Joined: Wed Aug 21, 2019 7:37 pm

Re: Selecting specific column in range

Post by A.Fish »

Awesome! Thank you MrProgrammer, this is exactly what I was looking for! I am able to get it to work now the way I was hoping with the final formula being : =INDEX(range;MATCH(value;INDEX(range;0;2);0);1)

Thanks again for the assistance.
A.Fish
Windows 10
OpenOffice 4.1.12
Locked