79286437

Date: 2024-12-17 01:03:29
Score: 0.5
Natty:
Report link

I found a "solution" to my issue. It does not do exactly what I wanted, but it is close enough.

First, I made a subfunction (so I could use it for any other function I need down the line) that just finds the address (relative cell reference) of whatever cell is input.

func_ref_cell_relative = LAMBDA(input_cell, ADDRESS(ROW(input_cell), COLUMN(input_cell),4))

Second, I made a subfunction that outputs the letter of the column for the input cell.

func_col_from_ref = LAMBDA(input_col_letter, SUBSTITUTE(ADDRESS(1, COLUMN(input_col_letter), 4), "1", ""))

Third, I made a function that creates an array from 3 user inputs: the cell where the array starts, the first cell of data in the array's end column, and the last row of data for the array (I have a cell that outputs this number, so the user can just select this cell as the third input).

eqn_create_array_ref = LAMBDA(array_start_cell, array_end_col, array_end_row, INDIRECT(func_ref_cell_relative(array_start_cell) & ":" & func_col_from_ref(array_end_col) & array_end_row))

So, my data starts in E5 and ends in column G, and in cell C25 it says my data ends on row 1465. The user types out =eqn_create_array_ref(E5,G5,$C$25) and the function evaluates that to be INDIRECT(E5:G1465).

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: CecilF