Click a cell value into another cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2442056%22%20slang%3D%22en-US%22%3EClick%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442056%22%20slang%3D%22en-US%22%3E%3CP%3EI%20built%20a%20%22Grower's%20Log%22%20to%20keep%20track%20of%20germination%20and%20harvest%20times%20for%20plants%20based%20on%20when%20their%20seeds%20were%20planted.%20On%20the%20first%20page%20is%20the%20seasonal%20log%2C%20designed%20to%20be%20cleared%20out%20at%20the%20end%20of%20each%20growing%20season.%20On%20the%20second%20page%20is%20the%20list%20of%20plants%20and%20their%20data.%20At%20the%20moment%20this%20is%20a%20very%20short%20list%2C%20but%20it%20has%20potential%20to%20be%20a%20very%20long%20one.%20In%20the%20log%2C%20I%20have%20the%20option%20to%20choose%20a%20plant%20from%20a%20dropdown%20list%20in%20a%20dynamic%20range%20from%20the%20data%20table%2C%20that%20function%20works%20fine%2C%20and%20all%20the%20rest%20of%20the%20data%20populates%2C%20and%20the%20germination%20and%20harvest%20days%20will%20count%20down%20when%20a%20date%20is%20entered%20in%20the%20second%20column%20of%20the%20log.%20I%20want%20to%20be%20able%20to%20%22click%22%20an%20entry%20into%20the%20log%20from%20the%20data%20table%2C%20basically%20doing%20the%20same%20thing%20in%20reverse.%20I%20know%20this%20formula%20will%20be%20somewhat%20complicated%2C%20but%20basically%20I%20have%20to%20link%20the%20cell%20in%20the%20data%20table%20to%20the%20first%20blank%20cell%20in%20the%20corresponding%20log%20table%2C%20then%20enter%20the%20value%20that%20I%20clicked%20in%20the%20data%20table%20into%20the%20log%2C%20all%20in%20one%20formula.%20I've%20exceeded%20my%20Excel%20knowledge%2C%20pretty%20much%20need%20everything%20after%20%3D%20for%20this%20one.%20Also%20really%20prefer%20to%20do%20this%20without%20a%20macro%2C%20I%20haven't%20used%20any%20yet.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2442056%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2442139%22%20slang%3D%22en-US%22%3ERe%3A%20Click%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442139%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1077451%22%20target%3D%22_blank%22%3E%40TLFulton%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOne%20option%20could%20be%20to%20link%20the%20growers%20log%20to%20the%20plant%20list.%20Type%20%22%3D%22%20and%20then%20navigate%20to%20the%20plant%20list%20and%20select%20the%20item%20you%20want%20to%20add.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAnother%20option%20could%20be%20to%20copy%2Fpaste%20special%20value%20the%20item%20from%20the%20plant%20list%20to%20the%20grower's%20log.%20If%20you%20don't%20want%20to%20copy%20one%20at%20a%20time%2C%20you%20could%20add%20a%20%22Select%22%20column%20to%20your%20plant%20list%20with%20an%20indicator%20(let's%20say%20an%20%22x%22)%20as%20a%26nbsp%3B%20data%20validation%20dropdown%20list.%20Then%2C%20make%20your%20selection%20by%20entering%20%22x%22%20in%20the%20new%20select%20column%2C%20filter%20your%20list%20for%20your%20selections%2C%20then%20copy%2Fpaste%20special%20value%20over%20to%20the%20growers%20log.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOr%2C%20you%20could%20add%20the%20%22Select%22%20column%2C%20and%20try%20a%20formula%20in%20the%20growers%20log%20to%20pick%20out%20the%20items%20you%20selected.%20If%20you%20have%20office%20365%20(I%20don't%20on%20this%20machine)%2C%20then%20I%20think%20this%20would%20work%20(I'm%20using%20%22PlantList%22%20for%20the%20table%20name%20-%20change%20to%20whatever%20yours%20actually%20is)%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIferror(index(Filter(PlantList%5BPLANTS%5D%2CPlantList%5BSELECT%5D%3D%22x%22%2C%22%22)%2Crows(index(%5BPLANTED%5D%2C1)%3A%5B%40PLANTED%5D))%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlternatively%2C%20you%20could%20try%3A%3C%2FP%3E%3CP%3E%3DIFERROR(INDEX(PlantList%5BPLANTS%5D%2CAGGREGATE(15%2C6%2CROW(PlantList%5BSELECT%5D)%2F(PlantList%5BSELECT%5D%3D%22x%22)%2CROWS(INDEX(%5BPLANTED%5D%2C1)%3A%5B%40PLANTED%5D))-ROW(INDEX(PlantList%5BSELECT%5D%2C1))%2B1)%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2442686%22%20slang%3D%22en-US%22%3ERe%3A%20Click%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2442686%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20hoping%20I%20could%20use%20a%20formula%20in%20the%20PlantsList%2C%20somehow%20use%20HYPERLINK%20with%20MATCH%20to%20send%20me%20to%20the%20first%20empty%20cell%20in%20the%20log%2C%20and%20then%20IF%20statements%3A%20IF%20%5B%40PLANTED%5D%3D%22%22%2C%5B%40PLANTED%5D%3D%5B%40PLANTS%5D%2C%20something%20like%20that%3F%3F%20I've%20yet%20to%20make%20it%20work%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2443634%22%20slang%3D%22en-US%22%3ERe%3A%20Click%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2443634%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1077451%22%20target%3D%22_blank%22%3E%40TLFulton%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20hyperlink%20will%20just%20jump%20to%20a%20specified%20location%2C%20it%20won't%20fill%20in%20the%20destination%20cell%20without%20vba%20(and%20while%20you%20can%20hyperlink%20to%20a%20variable%20cell%20location%20using%20the%20hyperlink%20function%2C%20it%20doesn't%20trigger%20the%20necessary%20event%20to%20activate%20the%20vba%20code%20I%20think%20you%20would%20need).%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20simply%20linking%20the%20cell%20or%20copy%2Fpasting%20aren't%20suitable%2C%20then%20I%20don't%20see%20how%20you%20accomplish%20this%20without%20vba.%20If%20you%20look%20at%20the%20attached%20workbook%2C%20it%20should%20fill%20in%20the%20log%20when%20you%20double%20click%20on%20the%20plant%20name%20from%20the%20list.%20If%20you%20right%20click%20on%20the%20worksheet%20tab%20and%20select%20view%20code%2C%20then%20you%20will%20see%20the%20macro%20code.%20You%20should%20be%20able%20to%20modify%20the%20%22Set%22%20statements%20for%20your%20worksheet%2Ftable%2Ffield%20names.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2467482%22%20slang%3D%22en-US%22%3ERe%3A%20Click%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467482%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1077451%22%20target%3D%22_blank%22%3E%40TLFulton%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20do%20not%20understand%20why%20you%20would%20%22delete%22%20precious%20dataset%20that%20you%20have%20collected%20on%20plants%20over%20a%20season%20when%20you%20can%20use%20that%20dataset%20to%20make%20comparisons%20later%20on%20to%20be%20able%20to%20tell%20you%20what%20you%20did%20different%20that%20created%20how%20much%20yield%20you%20had%20for%20that%20particular%20season%20and%20be%20able%20to%20compare%20the%20data%20from%20previous%20season%20to%20be%20able%20to%20compare%20the%20yield%20from%20this%20season%20of%20the%20last%20season%20for%20this%20time%20same%20period%20last%20year%3F%26nbsp%3B%20While%20big%20corporations%20are%20building%20big%20databases%20about%20their%20products%20in%20order%20to%20do%20that%20very%20same%20thing%20to%20get%20Business%20Intelligence%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2467672%22%20slang%3D%22en-US%22%3ERe%3A%20Click%20a%20cell%20value%20into%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2467672%22%20slang%3D%22en-US%22%3E%3CP%3EThere's%20two%20tables%2C%20the%20log%20and%20the%20database.%20The%20log%20is%20just%20a%20log%20that%20keeps%20germination%20and%20grow%20times%2C%20the%20notes%20can%20be%20added%20and%20amended%20in%20the%20database%20table%20at%20any%20time%2C%20it%20doesn't%20get%20cleared%20out.%20No%20notes%20are%20added%20in%20the%20log.%20What%20I'm%20trying%20to%20do%20is%20make%20the%20list%20work%20in%20reverse%2C%20so%20that%20I%20can%20click%20a%20plant%20into%20the%20log%20from%20the%20database%20table%2C%20rather%20than%20selecting%20it%20from%20the%20list%20in%20the%20log%20table%2C%20so%20that%20if%20I'm%20going%20through%20the%20database%20and%20decide%20I%20want%20to%20plant%20something%2C%20I%20can%20just%20click%20on%20it%20and%20it%20will%20send%20me%20to%20the%20log%20and%20and%20place%20the%20item%20in%20the%20first%20open%20row.%20Can%20you%20help%20with%20that%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I built a "Grower's Log" to keep track of germination and harvest times for plants based on when their seeds were planted. On the first page is the seasonal log, designed to be cleared out at the end of each growing season. On the second page is the list of plants and their data. At the moment this is a very short list, but it has potential to be a very long one. In the log, I have the option to choose a plant from a dropdown list in a dynamic range from the data table, that function works fine, and all the rest of the data populates, and the germination and harvest days will count down when a date is entered in the second column of the log. I want to be able to "click" an entry into the log from the data table, basically doing the same thing in reverse. I know this formula will be somewhat complicated, but basically I have to link the cell in the data table to the first blank cell in the corresponding log table, then enter the value that I clicked in the data table into the log, all in one formula. I've exceeded my Excel knowledge, pretty much need everything after = for this one. Also really prefer to do this without a macro, I haven't used any yet.

8 Replies

@TLFulton 

 

One option could be to link the growers log to the plant list. Type "=" and then navigate to the plant list and select the item you want to add.

 

Another option could be to copy/paste special value the item from the plant list to the grower's log. If you don't want to copy one at a time, you could add a "Select" column to your plant list with an indicator (let's say an "x") as a  data validation dropdown list. Then, make your selection by entering "x" in the new select column, filter your list for your selections, then copy/paste special value over to the growers log.

 

Edit: Edited to remove my formula suggestion. Since the date in the growers log is hardcoded, using a formula to pick out the selected items in the plant list would cause the date to not match as you add plants to the list (the formula would re-order the list). Sans vba, the only think I can offer at the moment would be to either link the cells, or copy/paste special value from the plant list to the log.

I was hoping I could use a formula in the PlantsList, somehow use HYPERLINK with MATCH to send me to the first empty cell in the log, and then IF statements: IF [@PLANTED]="",[@PLANTED]=[@PLANTS], something like that?? I've yet to make it work

 

@TLFulton 

 

A hyperlink will just jump to a specified location, it won't fill in the destination cell without vba (and while you can hyperlink to a variable cell location using the hyperlink function, it doesn't trigger the necessary event to activate the vba code I think you would need). 

 

If simply linking the cell or copy/pasting aren't suitable, then I don't see how you accomplish this without vba. If you look at the attached workbook, it should fill in the log when you double click on the plant name from the list. If you right click on the worksheet tab and select view code, then you will see the macro code. You should be able to modify the "Set" statements for your worksheet/table/field names.

Hi @TLFulton,

 

I do not understand why you would "delete" precious dataset that you have collected on plants over a season when you can use that dataset to make comparisons later on to be able to tell you what you did different that created how much yield you had for that particular season and be able to compare the data from previous season to be able to compare the yield from this season of the last season for this time same period last year?  While big corporations are building big databases about their products in order to do that very same thing to get Business Intelligence?

There's two tables, the log and the database. The log is just a log that keeps germination and grow times, the notes can be added and amended in the database table at any time, it doesn't get cleared out. No notes are added in the log. What I'm trying to do is make the list work in reverse, so that I can click a plant into the log from the database table, rather than selecting it from the list in the log table, so that if I'm going through the database and decide I want to plant something, I can just click on it and it will send me to the log and and place the item in the first open row. Can you help with that?

Hi @TLFulton,

 

I understand that you want  a dynamic solution for your spreadsheet to make your life easier.

 

See my article about dynamically updating a power pivot table leveraging power query and the data model:

Leveraging Power Query, and Data Model to Create a Dynamically Updating Power Pivot table | LinkedIn

 

A direct answer to your question:

"basically I have to link the cell in the data table to the first blank cell in the corresponding log table, then enter the value that I clicked in the data table into the log, all in one formula"

 

With that logic, then the formula solution you are proposing would have to map each blank cell of the entire Log Table (a memory hog similar to calculated columns), then your formula has to include a Lookup(2/1) function to find the last populated cell to find the next blank cell.

 

That formula would indeed be complicated as sphagetti code.

 

My question was geared towards creating a Log Table (where no data is deleted or removed) since its historical data much like the sales table, only you're not selling thing but growing things. (I like people who grow things) to find out and see if there can be an alternative compromise solution that can be extracted from the problem narrative.  I was not intending to make your proposal sound impossible.

 

cheers

You can instead create a searchable drop down list in each of the cell to your Log where when you type the name of the plant the drop down list will filter to the specific plant (much like autocomplete)

Cheers

Hi @TLFulton,

 

Here's a sample of the filtered drop down list, this list is 150 rows long but as soon as you type the first few letters it will filter down to more specific item much like a searchable drop down list that you can put on each cell of your log, or you'll have to do VBA which still involves a ListBox +VBA code, same difference:

Yea_So_0-1624378307604.png