SOLVED

Simple formula

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3142469%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3ESimple%20formula%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3142469%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3EHello%20guys%2C%20Please%20help%20a%20brother%20in%20need.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EIn%20column%20D%20theres%20a%20list%20of%205%20items%2C%20i%20would%20like%20whenever%20i%20select%20one%20item%20i%20want%20that%20it%20look%20for%20the%20last%20number%20used%20(in%20picture%202%20table)%20and%20bring%20me%20the%20next%20code%20to%20table%20one.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EPicture%20one%20-%20Table%20one%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%5C%26quot%3Blia-inline-image-display-wrapper%22%20lia-image-align-inline%3D%22%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fgxcuf89792%2F%5C%26quot%3Bhttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F346673i533A60E0433757F5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%5C%26quot%3B%22%20role%3D%22%5C%26quot%3Bbutton%5C%26quot%3B%22%20title%3D%22jcpolanco_0-1644405833346.png%22%20alt%3D%22%5C%26quot%3Bjcpolanco_0-1644405833346.png%5C%26quot%3B%22%20%2F%3E%26lt%3B%5C%2Fspan%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EPicture%202%20-%20Table%20two%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22%5C%26quot%3Blia-inline-image-display-wrapper%22%20lia-image-align-inline%3D%22%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Fgxcuf89792%2F%5C%26quot%3Bhttps%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F346675i4E9D63FEBB65307C%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%5C%26quot%3B%22%20role%3D%22%5C%26quot%3Bbutton%5C%26quot%3B%22%20title%3D%22jcpolanco_2-1644406113120.png%22%20alt%3D%22%5C%26quot%3Bjcpolanco_2-1644406113120.png%5C%26quot%3B%22%20%2F%3E%26lt%3B%5C%2Fspan%26gt%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EI%20want%20that%20if%20i%20select%20B01%20for%20row%201%20it%20brings%20me%20the%20number%20%22B0100000151%22%20and%20if%20i%20select%20on%20row%20two%20B01%20again%20it%20brings%20me%20the%20number%20%22B0100000152%22%20the%20same%20with%20the%20other%20types.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EWhich%20formula%20should%20i%20use%3F%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3142469%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EExcel%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EFormulas%20and%20Functions%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EMacros%20and%20VBA%26lt%3B%5C%2Flingo-label%26gt%3B%3CLINGO-LABEL%3EOffice%20365%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
New Contributor

Hello guys, Please help a brother in need.

 

In column D theres a list of 5 items. Whenever i select one of those item it should bring me a number. For instance if i select B01 for row 1 it should bring me the number "B0100000151" and if i select on row 2 B01 again it should brings me the number "B0100000152" which is the next one from B01 type, i would like the same with the other types.

 

Picture one - Table one

jcpolanco_0-1644405833346.png

 

Picture 2 - Table two

jcpolanco_2-1644406113120.png

 

Don't hesitate to contact if i need to elaborate

 

Which formula combination should i use?

 

 

 

6 Replies

@jcpolanco Try this:

=[@Type]&TEXT(COUNTIF(Table1[[#Headers],[Type]]:[@Type],[@Type]),"00000000")

 

 

Thank you so much @Riny_van_Eekelen!

 

I'm still a bit confused what i should put in the type cells.

 

=[@Type]&TEXT(COUNTIF(Table1[[#Headers],[Type]]:[@Type],[@Type]),"00000000")

 

Should it be like this

=[@B01]&TEXT(COUNTIF(table1[[#Headers],[B02]]:[@B14],[@B15]), "number column in table

 

Maybe better screeshots could help

 

Table one

jcpolanco_0-1644408432400.png

 

Table two

jcpolanco_1-1644408512343.png

 

 

 

 

 

 

 

@jcpolanco I have attached the file I worked on. See if you can use it your own file.

 

 

@Riny_van_Eekelen Thank you Riny so much!! Good input.

 

The thing is that the table two is static data i just want that whenever i select in column "D" a type for example "B01" i would like that it bring me the number on table two, more specific (column B ;row 2 "B010000151") and then one the second row if i select "B01" again i want it to bring me from table two "B010000152" 

 

I think it could be done with a VLOOKUP but i don't seem to find the best combination. Also i'm trying to attach the file but doesnt let me.

 

Am i a bit more clear?

best response confirmed by jcpolanco (New Contributor)
Solution

@jcpolanco I was afraid of that, but you didn't mention it needed to be static so I created a dynamic formula, suspecting that your table would have the all transactions from the beginning for each type (so all start at 1). What you want is not possible with regular formulae, at least I can't think of any. You'd need VBA to lookup the highest number used for a type, increase it by one and dump it in the active cell. VBA is not my thing. Sorry!

@jcpolanco

Hi,

I have added formula in Table1. From Column G to Column L I have listed the steps from which it is made. I hope this satisfies your query.