Excel, OFFSET/INDEX, and Match from List












0















Edited for sample:



I am attempting to fill in the Squads cell (G3) with "MP" from cell J1. I am doing this by checking if this squad has requested training, notated by a "YES" on their sheet. If there is a "YES" it fills in J1 with a number 1. I want to find the offset of a match to what will be a list of numbers with divisions (1 = MP, 2 = X, etc).



This is the equation I have so far tried varitions on in G2 to pull from the list.
=IF(J1=(MATCH(J1, K1)), OFFSET(MATCH(J1, K1),0,1), "")



I have attempted to use INDEX and MATCH as well. Either I get #VALUE, #N/A, or Excel tells me the equations is wrong depending on my variation. I have linked two pictures. The matching equation is giving me an error so I cannot save the IF statment as above.



Find equation for J1
Matching equation for G2










share|improve this question

























  • Can you please edit your question to add sample data and expected out come?

    – cybernetic.nomad
    Nov 13 '18 at 17:27
















0















Edited for sample:



I am attempting to fill in the Squads cell (G3) with "MP" from cell J1. I am doing this by checking if this squad has requested training, notated by a "YES" on their sheet. If there is a "YES" it fills in J1 with a number 1. I want to find the offset of a match to what will be a list of numbers with divisions (1 = MP, 2 = X, etc).



This is the equation I have so far tried varitions on in G2 to pull from the list.
=IF(J1=(MATCH(J1, K1)), OFFSET(MATCH(J1, K1),0,1), "")



I have attempted to use INDEX and MATCH as well. Either I get #VALUE, #N/A, or Excel tells me the equations is wrong depending on my variation. I have linked two pictures. The matching equation is giving me an error so I cannot save the IF statment as above.



Find equation for J1
Matching equation for G2










share|improve this question

























  • Can you please edit your question to add sample data and expected out come?

    – cybernetic.nomad
    Nov 13 '18 at 17:27














0












0








0








Edited for sample:



I am attempting to fill in the Squads cell (G3) with "MP" from cell J1. I am doing this by checking if this squad has requested training, notated by a "YES" on their sheet. If there is a "YES" it fills in J1 with a number 1. I want to find the offset of a match to what will be a list of numbers with divisions (1 = MP, 2 = X, etc).



This is the equation I have so far tried varitions on in G2 to pull from the list.
=IF(J1=(MATCH(J1, K1)), OFFSET(MATCH(J1, K1),0,1), "")



I have attempted to use INDEX and MATCH as well. Either I get #VALUE, #N/A, or Excel tells me the equations is wrong depending on my variation. I have linked two pictures. The matching equation is giving me an error so I cannot save the IF statment as above.



Find equation for J1
Matching equation for G2










share|improve this question
















Edited for sample:



I am attempting to fill in the Squads cell (G3) with "MP" from cell J1. I am doing this by checking if this squad has requested training, notated by a "YES" on their sheet. If there is a "YES" it fills in J1 with a number 1. I want to find the offset of a match to what will be a list of numbers with divisions (1 = MP, 2 = X, etc).



This is the equation I have so far tried varitions on in G2 to pull from the list.
=IF(J1=(MATCH(J1, K1)), OFFSET(MATCH(J1, K1),0,1), "")



I have attempted to use INDEX and MATCH as well. Either I get #VALUE, #N/A, or Excel tells me the equations is wrong depending on my variation. I have linked two pictures. The matching equation is giving me an error so I cannot save the IF statment as above.



Find equation for J1
Matching equation for G2







excel






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 18:04







fixurownemail

















asked Nov 13 '18 at 16:06









fixurownemailfixurownemail

61




61













  • Can you please edit your question to add sample data and expected out come?

    – cybernetic.nomad
    Nov 13 '18 at 17:27



















  • Can you please edit your question to add sample data and expected out come?

    – cybernetic.nomad
    Nov 13 '18 at 17:27

















Can you please edit your question to add sample data and expected out come?

– cybernetic.nomad
Nov 13 '18 at 17:27





Can you please edit your question to add sample data and expected out come?

– cybernetic.nomad
Nov 13 '18 at 17:27












1 Answer
1






active

oldest

votes


















0














Final Equation
So update. I was able to do a little more research and fiddle with the code. My final code of was =IF(MATCH(J8, K1:K5), INDEX(J1:K5, MATCH(J8, K1:K5), 1), ""). This made the code look for through the indexed array and move the offset division next to the number. The find equation is still working as it should.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53284987%2fexcel-offset-index-and-match-from-list%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Final Equation
    So update. I was able to do a little more research and fiddle with the code. My final code of was =IF(MATCH(J8, K1:K5), INDEX(J1:K5, MATCH(J8, K1:K5), 1), ""). This made the code look for through the indexed array and move the offset division next to the number. The find equation is still working as it should.






    share|improve this answer




























      0














      Final Equation
      So update. I was able to do a little more research and fiddle with the code. My final code of was =IF(MATCH(J8, K1:K5), INDEX(J1:K5, MATCH(J8, K1:K5), 1), ""). This made the code look for through the indexed array and move the offset division next to the number. The find equation is still working as it should.






      share|improve this answer


























        0












        0








        0







        Final Equation
        So update. I was able to do a little more research and fiddle with the code. My final code of was =IF(MATCH(J8, K1:K5), INDEX(J1:K5, MATCH(J8, K1:K5), 1), ""). This made the code look for through the indexed array and move the offset division next to the number. The find equation is still working as it should.






        share|improve this answer













        Final Equation
        So update. I was able to do a little more research and fiddle with the code. My final code of was =IF(MATCH(J8, K1:K5), INDEX(J1:K5, MATCH(J8, K1:K5), 1), ""). This made the code look for through the indexed array and move the offset division next to the number. The find equation is still working as it should.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 14 '18 at 19:20









        fixurownemailfixurownemail

        61




        61






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53284987%2fexcel-offset-index-and-match-from-list%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Florida Star v. B. J. F.

            Error while running script in elastic search , gateway timeout

            Adding quotations to stringified JSON object values