Forum Discussion
DJKraZMike
Aug 10, 2025Copper Contributor
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...
- 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))
DJKraZMike
Aug 12, 2025Copper Contributor
I appreciate your response, however, I am trying to transfer data from sheet 1 of a spreadsheet to sheet 2. Also, in the demo you sent, if a 0 is entered it throws a huge error.
Patrick2788
Aug 13, 2025Silver Contributor
The function works for me when 0 is entered for an item.