Hi,
Please see my attached spreadsheet.
I am looking for a formula that I can use to return the "Sheet" value (orange background) that corresponds to a code that I would enter manually.
The code would range from rows and columns on the lime green background.
Not really necessary, but if the formula also highlighted any duplicates in the Code range, that would be most helpful.
Can anyone help me please?
Thanks in advance
A
[Solved] Search a range and return the row's key
[Solved] Search a range and return the row's key
- Attachments
-
- Sheets from Codes.ods
- (27.58 KiB) Downloaded 13 times
Last edited by MrProgrammer on Tue Aug 05, 2025 4:10 pm, edited 2 times in total.
Reason: Tagged ✓ [Solved]; Suggestions provided and no response from angelsoft
Reason: Tagged ✓ [Solved]; Suggestions provided and no response from angelsoft
OpenOffice 3.1 on Windows 10
- MrProgrammer
- Moderator
- Posts: 5322
- Joined: Fri Jun 04, 2010 7:57 pm
- Location: Wisconsin, USA
Re: Help with range
The simplest solution is to use Edit → Find & Replace to search for the code. That doesn't require any formula. Find All will show duplicates.
If you want to use formulas, review this attachment. Spreading the codes across columns in the same row may be convenient for you, but it is difficult to work with that layout in Calc, so the formulas are complicated. Put C2825, C0000, and then C9999 in cell I2 to see what happens. The red color when you use the last two codes is provided by conditional formattting. If you don't understand my formulas, using Find & Replace by be a better solution for you.
[Tutorial] The SUMPRODUCT function
[Tutorial] Ten concepts that every Calc user should know
Read about conditional formatting in Help → Index or in User Guides (PDF) or searching for topics about it in the Calc Forum.
Some of the codes in your attachment have a space before the C, for example cells D7 and E7. I assumed that these were mistakes and removed them before investigating formulas. The formulas I created won't find cells containing mistakes in the code.
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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).
AOO 4.1.7 Build 9800, MacOS 13.7.6, iMac Intel. The locale for any menus or Calc formulas in my posts is English (USA).