How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask R.R. Jha Your Own Question
R.R. Jha
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience:  B.Tech
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds

I want to be able run a macro where i can select a combo of

This answer was rated:

  RRJha,    I want to be able run a macro where i can select a combo of five numbers that are found in columns A,B,C,D,E on row 44, upon selecting these numbers it will select the range of numbers in column J45 to N79. the number 14 will be first number to be found after row 44 in this range and is to record it where it appears next for ex: K46 but instead of recording the actual row and and column it will record as B2 and place it to the right on the column T 46.

Welcome back.

I have downloaded the file and I am looking at it now...


It is not clear which data is part of the original file and which data you have plugged in to explain the question. So first I will need the file that has ON:LY the original data "as is" before the macro is run (without showing any results or instructions). Could you send me that file please


John D


Customer: replied 4 years ago. ok here is the link. thanks


Ok the requirement is still not 100% clear, however I went ahead and created a macro as a first attempt based on the best of my understanding. That way you could test it and advise the specific changes or additions you would like to have in that macro

The user selects a cell or a row in the range A44:E79, then when they click the button the macro will highlight in columns J thru N the first matching numbers for the selected combination

Let me know
Customer: replied 4 years ago.

the link is not pulling up with what you had went ahead and done

also i stated that the user selects A 44 through E 44. then macor wil select the data in columns J 45 and N 79. it will run a search for ex: the number 14 selected in A 44 will be found in k46, this will be recorded not as k46 but the range that is selected will have hidden template range of A1 to E35. so will be recorded B2.


it searches each number in selected A44 B44 C44 D44 E44 from the range of data down one row J45 through N79. as stated above the 14 was search and first one found was in the K46 so then the macro goes to the next number in B44 which is 15 which is found on K45 but will be recorded as B1.

Customer: replied 4 years ago.
Relist: Incomplete answer.
john d did not ask questions before going ahead and putting together the program. he did so with out asking questions first. I addressed this question to RRjha and would like this person to answer my question, please thanks ps i also could not open link he attached. I don not want john d working on this question.
Try this link


Unzip the file then extract the xlsm file before opening it

Customer: replied 4 years ago.

your not telling me if you understand my question, i dont want to happen what happened last time I had paid double for the one question because you went ahead and set up program before asking the details. that is why i am requesting another tutor. thanks


I just logged in. I apologize that another expert intercepted despite you requesting me. This doesn't happen normally.

I've a couple of questions about your requirements.

Should the code work only for selection of A44 to E44?
When the value (14) is found in K46, what value should be written in T46?

Customer: replied 4 years ago.

hi, thanks for responding to my question, I appreciate it. the code should work like this, I select the data A44,B44,C44,D44,E 44, when I do this the range J45, N79 is the area in which the number will be found. for ex: A44 is the number 14 it will search in the range J45 to nN79 omitting the the J44,K44,L44,M44,N44. it will see the number 14 ( the first one it finds only beginning from the top below the selected number) and record it not as K46 but record it as B2 and this will be placed in the T46. Then the search for 15 will be found in k45 but will record it as B1 to T45. and so on until 5 numbers are recorded.

when you look on the workbook in the columns S T U V W You'll see the A B C D E 1-35 in each. this is just to use as a visual but when setting up program you can delete only the A B C D E 1-35 in the columns S

T U V W, This will be the hidden name of the range and this range will slide down a row below the selected number to be found in the range in J,K,L,M,N. I will be adding data in the spaces above so I want to be able to use this macro to allow me to shift the data to make more room and still work flawlessly. let me know if you can do this thanks

Ok, I got the working of the macro. My only question now is what value to write in T46 once I found 14 in K46, should I write B2 or just 2?

Customer: replied 4 years ago.


Ok, I'll send the macro soon.
Customer: replied 4 years ago.


Ok, should I clear the output range S45 to W79 before the macro is run? It means you would loose outputs from previous search.

Customer: replied 4 years ago.

yes that was just to show the visual. so everytime a select a combo it find the number and label acording to where it would be on this range. so when i go down to select another combo this range would drop down a row , so it follows what i do.

Ok, so for the next selection range of A45 to E45, the search range should be J46 to N80?

I've completed the module for A44 to E45. So, I just need to tweak it to work for other combos.
Customer: replied 4 years ago.


Ok, I think that's all I need to know.
Customer: replied 4 years ago.

ok let me know if you need more information, thanks

Alright :)
Customer: replied 4 years ago.



You need to spend $3 to view this post. Add Funds to your account and buy credits.
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience: B.Tech
R.R. Jha and 3 other Homework Specialists are ready to help you
Customer: replied 4 years ago.

ok it works! but please put the result of first number in s44 then the result for the second number in t44 and so on; so it reads left to right as apposed to being scattered. thanks good work!

Please download the file again from last link. Let me know if any further modification needed.

Customer: replied 4 years ago.

ok I did, if i selected the 5th combo down then the ABCDE should be one row down from that so everytime i select a combo each combo has its own ABCDE. then place the results on the right where you had placed them so one line as not to be scattered. thanks.

Ok, I first thought ABCDE are always at row 44. I'll update it and get back to you.
Customer: replied 4 years ago.
So the ABCDE 1 - 35 goes with each combo so they get there own.
Ok, updated the macro. Please download it again.
Customer: replied 4 years ago.

ok good! I downloaded it, and ran it, now can you enable this so I can use on the entire list of combos? iask cause i went to the very bottom and it came up with menu saying end or debug. then this will be complete. thanks

Ok, let me check.
Customer: replied 4 years ago.

ok, thanks :)

Fixed it. Please download the updated file again.

Customer: replied 4 years ago.

ok doing it now

Customer: replied 4 years ago.

ok doing it now, it works! do you see how i left space above when i enter new data

i should be able to run though data i add from row 42 to 1. so everytime i get new data i can run this macro not just on old data. thanks

Currently, the macro would work only for selection combo on row 44 or below. Do you want to work with rows above 44 too?
Customer: replied 4 years ago.


Ok, please download the new revision :)
Customer: replied 4 years ago.

ok ill do that now, if i run out of space above can i cut data and paste lower as to leave room above for new data and run macro?

Yes. It will now work for data anywhere on column A to E.
Customer: replied 4 years ago.

ok, good thanks! When I have more questions I will send them to you. Good job! thank you :)

Glad to help.
Customer: replied 4 years ago.

ok, just need to post payment and tip and leave rating. Thanks Again!

Related Homework Questions