0

I have two columns(Column A and Column B) which are in LIST drop down form

A   B  
a   1  
b   2   
c   3  
d   4 
....so on 

that means you can select "a" from column A and "2" from column B which gives combination "a""2" OR "a" from column A and "4" from column B which gives different combination "a""4" and so on, various combination are possible I want to create a submit button, which gives me a serial number in Column C in any cell such that

  • When I select "a" and "2" and press submit button, the serial number should be shown"1"
  • When I select again "a" and "2" and press submit button, the serial number should be shown "2"
  • And When I select "a" and "3" and press submit button, the serial number should be shown "1" because its a new combination and so on...
  • you specified worksheet-function tag, but you want to have submit button? Those to are not really good / easy / efficient to combine. Why do you need submit button, why not just use formulas and get the calculation automatically? – Máté Juhász Dec 21 '15 at 14:55
  • Welcome to Super User. We are not a script writing service. We expect users to tell us what they have tried so far (including any scripts they are using) and where they're stuck so that we can help with specific problems. Questions that only ask for scripts are too broad and are likely to be put on hold or closed. Please read How do I ask a good question?. – DavidPostill Dec 21 '15 at 15:23
  • Hi @MátéJuhász can yo let me know how to use" formulas and get the calculation automatically"? – Abhi0209 Dec 22 '15 at 4:06
  • Hi @DavidPostill I realize this is a broad question, but i am stuck at this juncture and i could not specifically try because i do not know where to proceed. If you could give me little direction i can start working on that. Column A and Column B are Chemistry and i am trying to build a repository for any one entering combination of chemistry to know their serial number in that particular combination – Abhi0209 Dec 22 '15 at 4:12
  • What you want is too logically diverse to be covered by a script. It can be, but the manual control you need to work with it would take more time than it would save. For your arbitrary dynamic situation there is no faster method than typing =A1&B3 in C1. I my self use plenty of custom solutions but what you asking for is hard to make efficient. What i suggest is you go to excelforum.com and ask them for a script that finds if a 1 cell in each column A and B is italic and then makes =A&B to first free row in next column then clears all italic cells. This is the quickest way i think. – helena4 Dec 22 '15 at 10:27
0

If your data is columns A:B, starting from second row, then put this formula in C2:

=IF(COUNTA(A2:B2)=2,COUNTIFS(A$1:A2,A2,B$1:B2,B2),"")

This will calculate desired index for you once both columns are filled, before cell will seem empty.

  • no @mate juhasz :( it is not solving the problem – Abhi0209 Dec 22 '15 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.