Forum Discussion

DJKraZMike's avatar
DJKraZMike
Copper Contributor
Aug 10, 2025
Solved

Tech Gurus I need your help.

I am trying to figure out a way that if the space on sheet 1 A1 has a 1 it will be copied to sheet 2 A1. If the space on sheet 1 has a 2 it will be copied to sheet2 to A1 and A2. Please tell me there...
  • HansVogelaar's avatar
    Aug 11, 2025

    Let's say your data are in A1:B6 on Sheet 1:

    On the second sheet, enter this formula in A1:

    =LET(
        Counts, 'Sheet 1'!A1:A6,
        Names, 'Sheet 1'!B1:B6,
        XLOOKUP(SEQUENCE(SUM(Counts)), SCAN(0, Counts, SUM), Names, , 1))

     

Resources