How to return all the cells in a row if first column matches a value on another worksheetReferenced cell...

What Brexit proposals are on the table in the indicative votes on the 27th of March 2019?

How did Doctor Strange see the winning outcome in Avengers: Infinity War?

How do we know the LHC results are robust?

Detecting if an element is found inside a container

What does the word "Atten" mean?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races

For a non-Jew, is there a punishment for not observing the 7 Noahide Laws?

Is the destination of a commercial flight important for the pilot?

Would a high gravity rocky planet be guaranteed to have an atmosphere?

Term for the "extreme-extension" version of a straw man fallacy?

Unreliable Magic - Is it worth it?

How does it work when somebody invests in my business?

Why are there no referendums in the US?

How to be diplomatic in refusing to write code that breaches the privacy of our users

Is there a problem with hiding "forgot password" until it's needed?

What is the best translation for "slot" in the context of multiplayer video games?

Why not increase contact surface when reentering the atmosphere?

Why Were Madagascar and New Zealand Discovered So Late?

Pole-zeros of a real-valued causal FIR system

Do the temporary hit points from Reckless Abandon stack if I make multiple attacks on my turn?

Lay out the Carpet

Why didn't Theresa May consult with Parliament before negotiating a deal with the EU?

Class Action - which options I have?

What is the intuitive meaning of having a linear relationship between the logs of two variables?



How to return all the cells in a row if first column matches a value on another worksheet


Referenced cell containing date-time showing up as a number in ExcelLookups targeting merged cells - only returning value for first rowIn Excel 2007 does the data from a formula referenced in another cell get used, or the formula itself?Trouble getting VLOOKUP to workhow do i extract cells from multiple spreadsheets all with same format into new master fileLast and first name lookup, return a value in that rowdoes 1 row from excel worksheets exist in another worksheet. If so copy, copy value from cellExcel - using vlookup to pull a whole row of dataExcel formula: from a cell value, populate cells (column) with value coming from another worksheetExcel - Return rows w/ column containing certain valueCopying only certain cells from a row to another worksheet













0















I have 2 worksheet tabs in an Excel workbook, tickets and tickets info. I have values in Column A of tickets (from A2:A500). I want to search for each value from A2 to A500 of the ticket sheet looking up in column A of tickets_info. If there is a match, return all of the cells for that row (ticket_info has information for each ticket from Column A to Column N).



I'm using the following formula:



=VLOOKUP(A2,tickets_info!A$2:N$5000,2,FALSE)


writing it in the ticket sheet, column C (column A contains the ticket Number and column B contains user name).



I have used A2 to N5000, which is the range of the data from the ticket_info sheet, which contains many columns of information concerning each ticket. The ticket numbers are in Column A from A2 to A5000.



I am encountering "Invalid Reference Error" when I commit the formula.










share|improve this question

























  • "I am encountering error when I commit the formnula" -- what error?

    – fixer1234
    Aug 1 '15 at 22:56











  • Invalid Reference Error

    – johnabraham
    Aug 1 '15 at 23:05











  • I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

    – johnabraham
    Aug 1 '15 at 23:35











  • That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

    – fixer1234
    Aug 1 '15 at 23:40











  • @johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

    – danicotra
    Aug 2 '15 at 13:59


















0















I have 2 worksheet tabs in an Excel workbook, tickets and tickets info. I have values in Column A of tickets (from A2:A500). I want to search for each value from A2 to A500 of the ticket sheet looking up in column A of tickets_info. If there is a match, return all of the cells for that row (ticket_info has information for each ticket from Column A to Column N).



I'm using the following formula:



=VLOOKUP(A2,tickets_info!A$2:N$5000,2,FALSE)


writing it in the ticket sheet, column C (column A contains the ticket Number and column B contains user name).



I have used A2 to N5000, which is the range of the data from the ticket_info sheet, which contains many columns of information concerning each ticket. The ticket numbers are in Column A from A2 to A5000.



I am encountering "Invalid Reference Error" when I commit the formula.










share|improve this question

























  • "I am encountering error when I commit the formnula" -- what error?

    – fixer1234
    Aug 1 '15 at 22:56











  • Invalid Reference Error

    – johnabraham
    Aug 1 '15 at 23:05











  • I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

    – johnabraham
    Aug 1 '15 at 23:35











  • That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

    – fixer1234
    Aug 1 '15 at 23:40











  • @johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

    – danicotra
    Aug 2 '15 at 13:59
















0












0








0








I have 2 worksheet tabs in an Excel workbook, tickets and tickets info. I have values in Column A of tickets (from A2:A500). I want to search for each value from A2 to A500 of the ticket sheet looking up in column A of tickets_info. If there is a match, return all of the cells for that row (ticket_info has information for each ticket from Column A to Column N).



I'm using the following formula:



=VLOOKUP(A2,tickets_info!A$2:N$5000,2,FALSE)


writing it in the ticket sheet, column C (column A contains the ticket Number and column B contains user name).



I have used A2 to N5000, which is the range of the data from the ticket_info sheet, which contains many columns of information concerning each ticket. The ticket numbers are in Column A from A2 to A5000.



I am encountering "Invalid Reference Error" when I commit the formula.










share|improve this question
















I have 2 worksheet tabs in an Excel workbook, tickets and tickets info. I have values in Column A of tickets (from A2:A500). I want to search for each value from A2 to A500 of the ticket sheet looking up in column A of tickets_info. If there is a match, return all of the cells for that row (ticket_info has information for each ticket from Column A to Column N).



I'm using the following formula:



=VLOOKUP(A2,tickets_info!A$2:N$5000,2,FALSE)


writing it in the ticket sheet, column C (column A contains the ticket Number and column B contains user name).



I have used A2 to N5000, which is the range of the data from the ticket_info sheet, which contains many columns of information concerning each ticket. The ticket numbers are in Column A from A2 to A5000.



I am encountering "Invalid Reference Error" when I commit the formula.







microsoft-excel worksheet-function search vlookup






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 2 '15 at 14:47









danicotra

1,1092621




1,1092621










asked Aug 1 '15 at 22:37









johnabrahamjohnabraham

13127




13127













  • "I am encountering error when I commit the formnula" -- what error?

    – fixer1234
    Aug 1 '15 at 22:56











  • Invalid Reference Error

    – johnabraham
    Aug 1 '15 at 23:05











  • I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

    – johnabraham
    Aug 1 '15 at 23:35











  • That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

    – fixer1234
    Aug 1 '15 at 23:40











  • @johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

    – danicotra
    Aug 2 '15 at 13:59





















  • "I am encountering error when I commit the formnula" -- what error?

    – fixer1234
    Aug 1 '15 at 22:56











  • Invalid Reference Error

    – johnabraham
    Aug 1 '15 at 23:05











  • I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

    – johnabraham
    Aug 1 '15 at 23:35











  • That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

    – fixer1234
    Aug 1 '15 at 23:40











  • @johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

    – danicotra
    Aug 2 '15 at 13:59



















"I am encountering error when I commit the formnula" -- what error?

– fixer1234
Aug 1 '15 at 22:56





"I am encountering error when I commit the formnula" -- what error?

– fixer1234
Aug 1 '15 at 22:56













Invalid Reference Error

– johnabraham
Aug 1 '15 at 23:05





Invalid Reference Error

– johnabraham
Aug 1 '15 at 23:05













I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

– johnabraham
Aug 1 '15 at 23:35





I have edited the formula as VLOOKUP(A2,tickets_info!$A$2:$N$5000,2,FALSE). It is only returning a value from one of row where there is a row rather than returning the entire row information( I have information for the match from A to N columns)

– johnabraham
Aug 1 '15 at 23:35













That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

– fixer1234
Aug 1 '15 at 23:40





That should return the value from col B in the matching row (the 2 in the next to last parameter). For col C, you need another formula with 3 in that position (a separate formula to retrieve each column's value).

– fixer1234
Aug 1 '15 at 23:40













@johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

– danicotra
Aug 2 '15 at 13:59







@johnabraham : I edited/improved a lot my answer so you may hopefully find something new and useful (if you find the time to read it 'till the end!). After this a lot of your comments below may make no sense anymore now so please follow fixer1234 suggestion and remove the needed-no-more ones. Bye there

– danicotra
Aug 2 '15 at 13:59












3 Answers
3






active

oldest

votes


















1














Ok, I think I got what you're trying to do and I think VLOOKUP could not be the way to go for this, using MATCH instead. Let's begin...



1ST APPROACH "all-values-in-a-single-cell":





  • On sheet "tickets"




    1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);


    2. D2 cell put formula =IF($C2>0,INDIRECT("'tickets_info'!O"&$C2),"");


    3. select C2 and D2 cells and copy formula down to line 500.


    4. (optional) hide column C.





  • On sheet "tickets_info"




    1. on O2 cell put formula =B2 & " " & C2 & " " & ... & N2;


    2. copy formula down to line 5000.


    3. (optional) hide column O.





EDIT:
What if, for some reason, you want/need to leave "tickets_info" sheet untouched?



You can make it using this partly modified version of the formula on sheet "tickets" D2 cell: (what was huge formula revisited after night sleep restoration)



=IF($C2>0,INDIRECT("'tickets_info'!B" & $C2)
& " " & INDIRECT("'tickets_info'!c" & $C2)
...
& " " & INDIRECT("'tickets_info'!N" & $C2),"")


or (even longer)



=IF($C2>0,INDIRECT(ADDRESS($C2,2,,,"tickets_info"))
& " " & INDIRECT(ADDRESS($C2,3,,,"tickets_info"))
...
& " " & INDIRECT(ADDRESS($C2,14,,,"tickets_info")),"")


then copy down. This way you won't need column O formula on "tickets_info" anymore (and thus there's no need to modify it in any way).



Notice I didn't write all those "repetitive" code blocks. Obviously, for the formula to work properly, those ... must be replaced adding the remaining necessary coding blocks with column reference incremented for each other column you need to show.



A FINAL NOTE FOR THIS EDIT: the final formula will be long but could have been really huge if we wanted to do without the intermediate value formula on C2 and using a unique combined C2/D2 formula on that cell (but that's highly awkward in my opinion, so I'm definitely not going to show you how!)



2ND APPROACH "a-single-cell-per-value" - UPDATED:



If you want to display values from "tickets_info" sheet B2 to N2 on separate columns on "tickets" sheet then here is the variant:




  1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);



  2. D2 cell put formula (old way) =IF($C2>0,INDIRECT("'tickets_info'!B"&$C2),"");



    (updated alternative) =IF($C2>0,INDIRECT(ADDRESS($C2,COLUMN()-1,,,"tickets_info")),"") ;




  3. (if doing the old way) copy/paste formula on D2 to the E2 to P2 cells interval BUT make sure to change ("increment") that B between ! and & to the necessary C, D, ..., N on the other columns where you copied the formula;



    (if using updated alternative - MY PREFERRED)
    What's important to understand here is that using COLUMN() in the formula let's you need not to remember to "step-by-step" change the !B"anymore as you copy the formula on the adjacent columns - isn't this freedom? ;-) Then you can simply copy/paste the formula on D2:P2 cells interval without having to change anything and thus (can't tell about performances but) this would be for sure the best choice if you want to avoid the risk of errors that may come by forgetting to increment references after copying formulas ...or even if you simply are lazy at writing/modifying repetitive code-blocks (...just like I am! ;-D)



  4. select C2 to P2 cells interval and copy formula down to line 500 (or whatever).


  5. (optional) hide column C.



That's it.



A FINAL NOTE ON THIS APPROACH (to dissect the way down): I often prefer MATCH to VLOOKUP but, in this case, I went straightway with it because, at first, I thought you needed a way to retrieve the whole corresponding row values on "tickets_info" with a single lookup; even the intermediate values calculated on column C are basically there for the same reason. Once you need individual values you could even get rid of them combining C/D columns formulas like follows:



=IF(ISERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0)),"",INDIRECT(ADDRESS(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),COLUMN()-1,,,"tickets_info")))


and simply copy/paste it to the C2:O500 cells interval.



Finally, in this case, as fixer1234 also suggested, VLOOKUP becomes a possible alternative in such a (even little shorter to write) way:



=IF(ISERROR(VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE)),"",VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE))




P.S. What to do in case you face formatting issues after you copy/past formula?




  • In case you went with second approach, just format the cell using the format you need (i.e. date/time for date and time values); you can use regular cell formatting for that, or define a custom formatting if you wish or, more simply (and highly recommended!) copy the original column(s) on sheet "tickets_info" from where values are retrieved and paste/special-only-formatting to the respective "ticket" sheet copy-destination column(s).


  • In case you went with first one, you may need to convert some retrieved numeric value to formatted text using TEXT function.
    One thing to be aware of in this case is that using TEXT function you will lose the ability to use the original value to make operations such as, for example, date or time calculations, tests to see if date meets certain conditions, etc.



So the advice would be to go with the first approach only when/if:



a) you are simply dealing with retrieving text values (numbers or anything already stored on text-formatted columns), as it wouldn't make any difference;



or b) a simple concatenated-copy of values is enough and you are not planning FOR SURE you'll need them individually to make any operations.



...otherwise do not think of it and follow always the second approach eyes closed, it certainly won't hurt.



Now, getting to the conclusion, at (long) last, I add some link suggestions by fixer1234 about the latter discussed matters:



How to create custom number formatting (with complete set of codes).



Explanation of TEXT function usage to convert a supplied numeric value into text.






share|improve this answer


























  • @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

    – danicotra
    Aug 1 '15 at 23:58













  • It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

    – johnabraham
    Aug 2 '15 at 0:29











  • @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

    – johnabraham
    Aug 2 '15 at 0:33











  • @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

    – johnabraham
    Aug 2 '15 at 0:54











  • @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

    – johnabraham
    Aug 2 '15 at 1:03





















0














I had the same issue and used the following:




  • In the Tickets sheet, Select C2 to O2


  • Without clicking anywhere, start typing:




    =VLOOKUP(A2, tickets_info!$A$2:$N$5000, {2,3,4,5,6,7,8,9,10,11,12,13,14,15}, FALSE)




  • Press Ctrl+Shift+Enter at the same time

  • Autofill down






share|improve this answer

































    0














    Guess I'm missing something about this, but it looks to me as if you have values on the "second" (output) page in column A and want to find their matching data for columns B through N. They would be a direct match: if a row's A column value exists in the "first" (source) sheet, then its F column value goes in the output sheet row's column F, etc. Some values in the A column on the output sheet will NOT match anything on the source sheet and so that row should be blank.



    If so, just do the VLOOKUP()'s in column B checking for column A's value in the source material's column A and returning the value it finds in column 2 of the source material (column B, in short).



    Note that in the output page's column 2, you want data from column 2 of the source sheet. And so on to the right. Here then is the twist:



    for the column to return argument (3rd argument), do NOT use a hand-typed numeral, but rather " Column() " and each column's cell will get the correct source column's value.



    Nothing more clever than that. Lots of VLOOKUP()'s though, but that's probably OK. My plain vanilla setup is OK with that for 5,000 rows, so my guess would be yours is too.



    But... if it doesn't match anything? Well, use an IF() test for the column B VLOOKUP() and return "" if column A in that row doesn't match anything in the source column A.



    And now, the magic. Who wants to rely on "probably OK" or be held down to 5,000-ish rows, or even double that, then choking? No one.



    Excel evaluates formulas from left-to-right AS MUCH AS it possibly can and STOPS evaluating when it has the result. If it had an IF() test first and its result = TRUE, it would skip anything else and go to the result for TRUE (and stop if that's a "constant" like "8" or "tree" or evaluate what's there if it is itself a function or two. So if you add an IF() test to all the cells in columns C through N like the following:



    =IF( $B2 = "", "", VLOOKUP( $A2, tickets_info!$A$2:$N$5000, COLUMN(), FALSE))


    then ALL those columns rightward from column C will swiftly evaluate to "" if there was no match for the column A value and never do the VLOOKUP()'s! (TRUE in that case is "" which is a constant and needs no further evaluation so Excel stops and displays "".) So no more "probably OK", no choking any time soon. If there are only 943 rows of values to check on the output page, and only 634 of them match on the source page, only 634 * 12 = 7,608 extra VLOOKUP()'s are done, not 5,000 * 12 = 60,000.



    Also, if your source data would never change (once on the source sheet, it might be sorted up or down, but would NEVER be edited), then you could always periodically copy a tranch of the output cells and Paste|Special|Values to do away with their formulas which would further reduce the "load."





    share








    New contributor




    Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.




















      Your Answer








      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "3"
      };
      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%2fsuperuser.com%2fquestions%2f949130%2fhow-to-return-all-the-cells-in-a-row-if-first-column-matches-a-value-on-another%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Ok, I think I got what you're trying to do and I think VLOOKUP could not be the way to go for this, using MATCH instead. Let's begin...



      1ST APPROACH "all-values-in-a-single-cell":





      • On sheet "tickets"




        1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);


        2. D2 cell put formula =IF($C2>0,INDIRECT("'tickets_info'!O"&$C2),"");


        3. select C2 and D2 cells and copy formula down to line 500.


        4. (optional) hide column C.





      • On sheet "tickets_info"




        1. on O2 cell put formula =B2 & " " & C2 & " " & ... & N2;


        2. copy formula down to line 5000.


        3. (optional) hide column O.





      EDIT:
      What if, for some reason, you want/need to leave "tickets_info" sheet untouched?



      You can make it using this partly modified version of the formula on sheet "tickets" D2 cell: (what was huge formula revisited after night sleep restoration)



      =IF($C2>0,INDIRECT("'tickets_info'!B" & $C2)
      & " " & INDIRECT("'tickets_info'!c" & $C2)
      ...
      & " " & INDIRECT("'tickets_info'!N" & $C2),"")


      or (even longer)



      =IF($C2>0,INDIRECT(ADDRESS($C2,2,,,"tickets_info"))
      & " " & INDIRECT(ADDRESS($C2,3,,,"tickets_info"))
      ...
      & " " & INDIRECT(ADDRESS($C2,14,,,"tickets_info")),"")


      then copy down. This way you won't need column O formula on "tickets_info" anymore (and thus there's no need to modify it in any way).



      Notice I didn't write all those "repetitive" code blocks. Obviously, for the formula to work properly, those ... must be replaced adding the remaining necessary coding blocks with column reference incremented for each other column you need to show.



      A FINAL NOTE FOR THIS EDIT: the final formula will be long but could have been really huge if we wanted to do without the intermediate value formula on C2 and using a unique combined C2/D2 formula on that cell (but that's highly awkward in my opinion, so I'm definitely not going to show you how!)



      2ND APPROACH "a-single-cell-per-value" - UPDATED:



      If you want to display values from "tickets_info" sheet B2 to N2 on separate columns on "tickets" sheet then here is the variant:




      1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);



      2. D2 cell put formula (old way) =IF($C2>0,INDIRECT("'tickets_info'!B"&$C2),"");



        (updated alternative) =IF($C2>0,INDIRECT(ADDRESS($C2,COLUMN()-1,,,"tickets_info")),"") ;




      3. (if doing the old way) copy/paste formula on D2 to the E2 to P2 cells interval BUT make sure to change ("increment") that B between ! and & to the necessary C, D, ..., N on the other columns where you copied the formula;



        (if using updated alternative - MY PREFERRED)
        What's important to understand here is that using COLUMN() in the formula let's you need not to remember to "step-by-step" change the !B"anymore as you copy the formula on the adjacent columns - isn't this freedom? ;-) Then you can simply copy/paste the formula on D2:P2 cells interval without having to change anything and thus (can't tell about performances but) this would be for sure the best choice if you want to avoid the risk of errors that may come by forgetting to increment references after copying formulas ...or even if you simply are lazy at writing/modifying repetitive code-blocks (...just like I am! ;-D)



      4. select C2 to P2 cells interval and copy formula down to line 500 (or whatever).


      5. (optional) hide column C.



      That's it.



      A FINAL NOTE ON THIS APPROACH (to dissect the way down): I often prefer MATCH to VLOOKUP but, in this case, I went straightway with it because, at first, I thought you needed a way to retrieve the whole corresponding row values on "tickets_info" with a single lookup; even the intermediate values calculated on column C are basically there for the same reason. Once you need individual values you could even get rid of them combining C/D columns formulas like follows:



      =IF(ISERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0)),"",INDIRECT(ADDRESS(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),COLUMN()-1,,,"tickets_info")))


      and simply copy/paste it to the C2:O500 cells interval.



      Finally, in this case, as fixer1234 also suggested, VLOOKUP becomes a possible alternative in such a (even little shorter to write) way:



      =IF(ISERROR(VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE)),"",VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE))




      P.S. What to do in case you face formatting issues after you copy/past formula?




      • In case you went with second approach, just format the cell using the format you need (i.e. date/time for date and time values); you can use regular cell formatting for that, or define a custom formatting if you wish or, more simply (and highly recommended!) copy the original column(s) on sheet "tickets_info" from where values are retrieved and paste/special-only-formatting to the respective "ticket" sheet copy-destination column(s).


      • In case you went with first one, you may need to convert some retrieved numeric value to formatted text using TEXT function.
        One thing to be aware of in this case is that using TEXT function you will lose the ability to use the original value to make operations such as, for example, date or time calculations, tests to see if date meets certain conditions, etc.



      So the advice would be to go with the first approach only when/if:



      a) you are simply dealing with retrieving text values (numbers or anything already stored on text-formatted columns), as it wouldn't make any difference;



      or b) a simple concatenated-copy of values is enough and you are not planning FOR SURE you'll need them individually to make any operations.



      ...otherwise do not think of it and follow always the second approach eyes closed, it certainly won't hurt.



      Now, getting to the conclusion, at (long) last, I add some link suggestions by fixer1234 about the latter discussed matters:



      How to create custom number formatting (with complete set of codes).



      Explanation of TEXT function usage to convert a supplied numeric value into text.






      share|improve this answer


























      • @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

        – danicotra
        Aug 1 '15 at 23:58













      • It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

        – johnabraham
        Aug 2 '15 at 0:29











      • @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

        – johnabraham
        Aug 2 '15 at 0:33











      • @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

        – johnabraham
        Aug 2 '15 at 0:54











      • @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

        – johnabraham
        Aug 2 '15 at 1:03


















      1














      Ok, I think I got what you're trying to do and I think VLOOKUP could not be the way to go for this, using MATCH instead. Let's begin...



      1ST APPROACH "all-values-in-a-single-cell":





      • On sheet "tickets"




        1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);


        2. D2 cell put formula =IF($C2>0,INDIRECT("'tickets_info'!O"&$C2),"");


        3. select C2 and D2 cells and copy formula down to line 500.


        4. (optional) hide column C.





      • On sheet "tickets_info"




        1. on O2 cell put formula =B2 & " " & C2 & " " & ... & N2;


        2. copy formula down to line 5000.


        3. (optional) hide column O.





      EDIT:
      What if, for some reason, you want/need to leave "tickets_info" sheet untouched?



      You can make it using this partly modified version of the formula on sheet "tickets" D2 cell: (what was huge formula revisited after night sleep restoration)



      =IF($C2>0,INDIRECT("'tickets_info'!B" & $C2)
      & " " & INDIRECT("'tickets_info'!c" & $C2)
      ...
      & " " & INDIRECT("'tickets_info'!N" & $C2),"")


      or (even longer)



      =IF($C2>0,INDIRECT(ADDRESS($C2,2,,,"tickets_info"))
      & " " & INDIRECT(ADDRESS($C2,3,,,"tickets_info"))
      ...
      & " " & INDIRECT(ADDRESS($C2,14,,,"tickets_info")),"")


      then copy down. This way you won't need column O formula on "tickets_info" anymore (and thus there's no need to modify it in any way).



      Notice I didn't write all those "repetitive" code blocks. Obviously, for the formula to work properly, those ... must be replaced adding the remaining necessary coding blocks with column reference incremented for each other column you need to show.



      A FINAL NOTE FOR THIS EDIT: the final formula will be long but could have been really huge if we wanted to do without the intermediate value formula on C2 and using a unique combined C2/D2 formula on that cell (but that's highly awkward in my opinion, so I'm definitely not going to show you how!)



      2ND APPROACH "a-single-cell-per-value" - UPDATED:



      If you want to display values from "tickets_info" sheet B2 to N2 on separate columns on "tickets" sheet then here is the variant:




      1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);



      2. D2 cell put formula (old way) =IF($C2>0,INDIRECT("'tickets_info'!B"&$C2),"");



        (updated alternative) =IF($C2>0,INDIRECT(ADDRESS($C2,COLUMN()-1,,,"tickets_info")),"") ;




      3. (if doing the old way) copy/paste formula on D2 to the E2 to P2 cells interval BUT make sure to change ("increment") that B between ! and & to the necessary C, D, ..., N on the other columns where you copied the formula;



        (if using updated alternative - MY PREFERRED)
        What's important to understand here is that using COLUMN() in the formula let's you need not to remember to "step-by-step" change the !B"anymore as you copy the formula on the adjacent columns - isn't this freedom? ;-) Then you can simply copy/paste the formula on D2:P2 cells interval without having to change anything and thus (can't tell about performances but) this would be for sure the best choice if you want to avoid the risk of errors that may come by forgetting to increment references after copying formulas ...or even if you simply are lazy at writing/modifying repetitive code-blocks (...just like I am! ;-D)



      4. select C2 to P2 cells interval and copy formula down to line 500 (or whatever).


      5. (optional) hide column C.



      That's it.



      A FINAL NOTE ON THIS APPROACH (to dissect the way down): I often prefer MATCH to VLOOKUP but, in this case, I went straightway with it because, at first, I thought you needed a way to retrieve the whole corresponding row values on "tickets_info" with a single lookup; even the intermediate values calculated on column C are basically there for the same reason. Once you need individual values you could even get rid of them combining C/D columns formulas like follows:



      =IF(ISERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0)),"",INDIRECT(ADDRESS(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),COLUMN()-1,,,"tickets_info")))


      and simply copy/paste it to the C2:O500 cells interval.



      Finally, in this case, as fixer1234 also suggested, VLOOKUP becomes a possible alternative in such a (even little shorter to write) way:



      =IF(ISERROR(VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE)),"",VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE))




      P.S. What to do in case you face formatting issues after you copy/past formula?




      • In case you went with second approach, just format the cell using the format you need (i.e. date/time for date and time values); you can use regular cell formatting for that, or define a custom formatting if you wish or, more simply (and highly recommended!) copy the original column(s) on sheet "tickets_info" from where values are retrieved and paste/special-only-formatting to the respective "ticket" sheet copy-destination column(s).


      • In case you went with first one, you may need to convert some retrieved numeric value to formatted text using TEXT function.
        One thing to be aware of in this case is that using TEXT function you will lose the ability to use the original value to make operations such as, for example, date or time calculations, tests to see if date meets certain conditions, etc.



      So the advice would be to go with the first approach only when/if:



      a) you are simply dealing with retrieving text values (numbers or anything already stored on text-formatted columns), as it wouldn't make any difference;



      or b) a simple concatenated-copy of values is enough and you are not planning FOR SURE you'll need them individually to make any operations.



      ...otherwise do not think of it and follow always the second approach eyes closed, it certainly won't hurt.



      Now, getting to the conclusion, at (long) last, I add some link suggestions by fixer1234 about the latter discussed matters:



      How to create custom number formatting (with complete set of codes).



      Explanation of TEXT function usage to convert a supplied numeric value into text.






      share|improve this answer


























      • @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

        – danicotra
        Aug 1 '15 at 23:58













      • It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

        – johnabraham
        Aug 2 '15 at 0:29











      • @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

        – johnabraham
        Aug 2 '15 at 0:33











      • @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

        – johnabraham
        Aug 2 '15 at 0:54











      • @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

        – johnabraham
        Aug 2 '15 at 1:03
















      1












      1








      1







      Ok, I think I got what you're trying to do and I think VLOOKUP could not be the way to go for this, using MATCH instead. Let's begin...



      1ST APPROACH "all-values-in-a-single-cell":





      • On sheet "tickets"




        1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);


        2. D2 cell put formula =IF($C2>0,INDIRECT("'tickets_info'!O"&$C2),"");


        3. select C2 and D2 cells and copy formula down to line 500.


        4. (optional) hide column C.





      • On sheet "tickets_info"




        1. on O2 cell put formula =B2 & " " & C2 & " " & ... & N2;


        2. copy formula down to line 5000.


        3. (optional) hide column O.





      EDIT:
      What if, for some reason, you want/need to leave "tickets_info" sheet untouched?



      You can make it using this partly modified version of the formula on sheet "tickets" D2 cell: (what was huge formula revisited after night sleep restoration)



      =IF($C2>0,INDIRECT("'tickets_info'!B" & $C2)
      & " " & INDIRECT("'tickets_info'!c" & $C2)
      ...
      & " " & INDIRECT("'tickets_info'!N" & $C2),"")


      or (even longer)



      =IF($C2>0,INDIRECT(ADDRESS($C2,2,,,"tickets_info"))
      & " " & INDIRECT(ADDRESS($C2,3,,,"tickets_info"))
      ...
      & " " & INDIRECT(ADDRESS($C2,14,,,"tickets_info")),"")


      then copy down. This way you won't need column O formula on "tickets_info" anymore (and thus there's no need to modify it in any way).



      Notice I didn't write all those "repetitive" code blocks. Obviously, for the formula to work properly, those ... must be replaced adding the remaining necessary coding blocks with column reference incremented for each other column you need to show.



      A FINAL NOTE FOR THIS EDIT: the final formula will be long but could have been really huge if we wanted to do without the intermediate value formula on C2 and using a unique combined C2/D2 formula on that cell (but that's highly awkward in my opinion, so I'm definitely not going to show you how!)



      2ND APPROACH "a-single-cell-per-value" - UPDATED:



      If you want to display values from "tickets_info" sheet B2 to N2 on separate columns on "tickets" sheet then here is the variant:




      1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);



      2. D2 cell put formula (old way) =IF($C2>0,INDIRECT("'tickets_info'!B"&$C2),"");



        (updated alternative) =IF($C2>0,INDIRECT(ADDRESS($C2,COLUMN()-1,,,"tickets_info")),"") ;




      3. (if doing the old way) copy/paste formula on D2 to the E2 to P2 cells interval BUT make sure to change ("increment") that B between ! and & to the necessary C, D, ..., N on the other columns where you copied the formula;



        (if using updated alternative - MY PREFERRED)
        What's important to understand here is that using COLUMN() in the formula let's you need not to remember to "step-by-step" change the !B"anymore as you copy the formula on the adjacent columns - isn't this freedom? ;-) Then you can simply copy/paste the formula on D2:P2 cells interval without having to change anything and thus (can't tell about performances but) this would be for sure the best choice if you want to avoid the risk of errors that may come by forgetting to increment references after copying formulas ...or even if you simply are lazy at writing/modifying repetitive code-blocks (...just like I am! ;-D)



      4. select C2 to P2 cells interval and copy formula down to line 500 (or whatever).


      5. (optional) hide column C.



      That's it.



      A FINAL NOTE ON THIS APPROACH (to dissect the way down): I often prefer MATCH to VLOOKUP but, in this case, I went straightway with it because, at first, I thought you needed a way to retrieve the whole corresponding row values on "tickets_info" with a single lookup; even the intermediate values calculated on column C are basically there for the same reason. Once you need individual values you could even get rid of them combining C/D columns formulas like follows:



      =IF(ISERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0)),"",INDIRECT(ADDRESS(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),COLUMN()-1,,,"tickets_info")))


      and simply copy/paste it to the C2:O500 cells interval.



      Finally, in this case, as fixer1234 also suggested, VLOOKUP becomes a possible alternative in such a (even little shorter to write) way:



      =IF(ISERROR(VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE)),"",VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE))




      P.S. What to do in case you face formatting issues after you copy/past formula?




      • In case you went with second approach, just format the cell using the format you need (i.e. date/time for date and time values); you can use regular cell formatting for that, or define a custom formatting if you wish or, more simply (and highly recommended!) copy the original column(s) on sheet "tickets_info" from where values are retrieved and paste/special-only-formatting to the respective "ticket" sheet copy-destination column(s).


      • In case you went with first one, you may need to convert some retrieved numeric value to formatted text using TEXT function.
        One thing to be aware of in this case is that using TEXT function you will lose the ability to use the original value to make operations such as, for example, date or time calculations, tests to see if date meets certain conditions, etc.



      So the advice would be to go with the first approach only when/if:



      a) you are simply dealing with retrieving text values (numbers or anything already stored on text-formatted columns), as it wouldn't make any difference;



      or b) a simple concatenated-copy of values is enough and you are not planning FOR SURE you'll need them individually to make any operations.



      ...otherwise do not think of it and follow always the second approach eyes closed, it certainly won't hurt.



      Now, getting to the conclusion, at (long) last, I add some link suggestions by fixer1234 about the latter discussed matters:



      How to create custom number formatting (with complete set of codes).



      Explanation of TEXT function usage to convert a supplied numeric value into text.






      share|improve this answer















      Ok, I think I got what you're trying to do and I think VLOOKUP could not be the way to go for this, using MATCH instead. Let's begin...



      1ST APPROACH "all-values-in-a-single-cell":





      • On sheet "tickets"




        1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);


        2. D2 cell put formula =IF($C2>0,INDIRECT("'tickets_info'!O"&$C2),"");


        3. select C2 and D2 cells and copy formula down to line 500.


        4. (optional) hide column C.





      • On sheet "tickets_info"




        1. on O2 cell put formula =B2 & " " & C2 & " " & ... & N2;


        2. copy formula down to line 5000.


        3. (optional) hide column O.





      EDIT:
      What if, for some reason, you want/need to leave "tickets_info" sheet untouched?



      You can make it using this partly modified version of the formula on sheet "tickets" D2 cell: (what was huge formula revisited after night sleep restoration)



      =IF($C2>0,INDIRECT("'tickets_info'!B" & $C2)
      & " " & INDIRECT("'tickets_info'!c" & $C2)
      ...
      & " " & INDIRECT("'tickets_info'!N" & $C2),"")


      or (even longer)



      =IF($C2>0,INDIRECT(ADDRESS($C2,2,,,"tickets_info"))
      & " " & INDIRECT(ADDRESS($C2,3,,,"tickets_info"))
      ...
      & " " & INDIRECT(ADDRESS($C2,14,,,"tickets_info")),"")


      then copy down. This way you won't need column O formula on "tickets_info" anymore (and thus there's no need to modify it in any way).



      Notice I didn't write all those "repetitive" code blocks. Obviously, for the formula to work properly, those ... must be replaced adding the remaining necessary coding blocks with column reference incremented for each other column you need to show.



      A FINAL NOTE FOR THIS EDIT: the final formula will be long but could have been really huge if we wanted to do without the intermediate value formula on C2 and using a unique combined C2/D2 formula on that cell (but that's highly awkward in my opinion, so I'm definitely not going to show you how!)



      2ND APPROACH "a-single-cell-per-value" - UPDATED:



      If you want to display values from "tickets_info" sheet B2 to N2 on separate columns on "tickets" sheet then here is the variant:




      1. C2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),0);



      2. D2 cell put formula (old way) =IF($C2>0,INDIRECT("'tickets_info'!B"&$C2),"");



        (updated alternative) =IF($C2>0,INDIRECT(ADDRESS($C2,COLUMN()-1,,,"tickets_info")),"") ;




      3. (if doing the old way) copy/paste formula on D2 to the E2 to P2 cells interval BUT make sure to change ("increment") that B between ! and & to the necessary C, D, ..., N on the other columns where you copied the formula;



        (if using updated alternative - MY PREFERRED)
        What's important to understand here is that using COLUMN() in the formula let's you need not to remember to "step-by-step" change the !B"anymore as you copy the formula on the adjacent columns - isn't this freedom? ;-) Then you can simply copy/paste the formula on D2:P2 cells interval without having to change anything and thus (can't tell about performances but) this would be for sure the best choice if you want to avoid the risk of errors that may come by forgetting to increment references after copying formulas ...or even if you simply are lazy at writing/modifying repetitive code-blocks (...just like I am! ;-D)



      4. select C2 to P2 cells interval and copy formula down to line 500 (or whatever).


      5. (optional) hide column C.



      That's it.



      A FINAL NOTE ON THIS APPROACH (to dissect the way down): I often prefer MATCH to VLOOKUP but, in this case, I went straightway with it because, at first, I thought you needed a way to retrieve the whole corresponding row values on "tickets_info" with a single lookup; even the intermediate values calculated on column C are basically there for the same reason. Once you need individual values you could even get rid of them combining C/D columns formulas like follows:



      =IF(ISERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0)),"",INDIRECT(ADDRESS(1+MATCH($A2,'tickets_info'!$A$2:$A$5000,0),COLUMN()-1,,,"tickets_info")))


      and simply copy/paste it to the C2:O500 cells interval.



      Finally, in this case, as fixer1234 also suggested, VLOOKUP becomes a possible alternative in such a (even little shorter to write) way:



      =IF(ISERROR(VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE)),"",VLOOKUP($A2,'tickets_info'!$A$2:$N$5000,COLUMN()-1,FALSE))




      P.S. What to do in case you face formatting issues after you copy/past formula?




      • In case you went with second approach, just format the cell using the format you need (i.e. date/time for date and time values); you can use regular cell formatting for that, or define a custom formatting if you wish or, more simply (and highly recommended!) copy the original column(s) on sheet "tickets_info" from where values are retrieved and paste/special-only-formatting to the respective "ticket" sheet copy-destination column(s).


      • In case you went with first one, you may need to convert some retrieved numeric value to formatted text using TEXT function.
        One thing to be aware of in this case is that using TEXT function you will lose the ability to use the original value to make operations such as, for example, date or time calculations, tests to see if date meets certain conditions, etc.



      So the advice would be to go with the first approach only when/if:



      a) you are simply dealing with retrieving text values (numbers or anything already stored on text-formatted columns), as it wouldn't make any difference;



      or b) a simple concatenated-copy of values is enough and you are not planning FOR SURE you'll need them individually to make any operations.



      ...otherwise do not think of it and follow always the second approach eyes closed, it certainly won't hurt.



      Now, getting to the conclusion, at (long) last, I add some link suggestions by fixer1234 about the latter discussed matters:



      How to create custom number formatting (with complete set of codes).



      Explanation of TEXT function usage to convert a supplied numeric value into text.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Aug 2 '15 at 15:08

























      answered Aug 1 '15 at 23:37









      danicotradanicotra

      1,1092621




      1,1092621













      • @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

        – danicotra
        Aug 1 '15 at 23:58













      • It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

        – johnabraham
        Aug 2 '15 at 0:29











      • @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

        – johnabraham
        Aug 2 '15 at 0:33











      • @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

        – johnabraham
        Aug 2 '15 at 0:54











      • @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

        – johnabraham
        Aug 2 '15 at 1:03





















      • @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

        – danicotra
        Aug 1 '15 at 23:58













      • It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

        – johnabraham
        Aug 2 '15 at 0:29











      • @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

        – johnabraham
        Aug 2 '15 at 0:33











      • @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

        – johnabraham
        Aug 2 '15 at 0:54











      • @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

        – johnabraham
        Aug 2 '15 at 1:03



















      @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

      – danicotra
      Aug 1 '15 at 23:58







      @fixer1234 : well, I don't think so, once values are all in the same row (columns A to N) and once you know WHICH is the corresponding row in the other sheet (MATCH returns that actually if the value is found) you can refer to any column on that row and use the value you need if necessary. (Answering to first part of your comment here.)

      – danicotra
      Aug 1 '15 at 23:58















      It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

      – johnabraham
      Aug 2 '15 at 0:29





      It worked this time. Thanks. The values from B2 to N2 are showing up in one cell. Can we modify to get the values from B2 to N2 into different rows

      – johnabraham
      Aug 2 '15 at 0:29













      @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

      – johnabraham
      Aug 2 '15 at 0:33





      @fixer1234 There are mutiple sheet which I combined into one now as the formula is working. But as I said all the rows value from B2 to N2 are showing up in only one row rather than different row

      – johnabraham
      Aug 2 '15 at 0:33













      @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

      – johnabraham
      Aug 2 '15 at 0:54





      @fixer1234 it is returning values.. But I need to modify as suggested by danicotra

      – johnabraham
      Aug 2 '15 at 0:54













      @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

      – johnabraham
      Aug 2 '15 at 1:03







      @fixer1234.. Are you refering to this.. sorry I am confused . On sheet "tickets" B2 cell put formula =IFERROR(1+MATCH($A2,'tickets_info'!$A$2:$A$500,0),0); C2 cell put formula =IF($B2>0,INDIRECT("'tickets_info'!O"&B2),""); select B2 and C3 cells and copy formula down to line 500. (optional) hide column B.

      – johnabraham
      Aug 2 '15 at 1:03















      0














      I had the same issue and used the following:




      • In the Tickets sheet, Select C2 to O2


      • Without clicking anywhere, start typing:




        =VLOOKUP(A2, tickets_info!$A$2:$N$5000, {2,3,4,5,6,7,8,9,10,11,12,13,14,15}, FALSE)




      • Press Ctrl+Shift+Enter at the same time

      • Autofill down






      share|improve this answer






























        0














        I had the same issue and used the following:




        • In the Tickets sheet, Select C2 to O2


        • Without clicking anywhere, start typing:




          =VLOOKUP(A2, tickets_info!$A$2:$N$5000, {2,3,4,5,6,7,8,9,10,11,12,13,14,15}, FALSE)




        • Press Ctrl+Shift+Enter at the same time

        • Autofill down






        share|improve this answer




























          0












          0








          0







          I had the same issue and used the following:




          • In the Tickets sheet, Select C2 to O2


          • Without clicking anywhere, start typing:




            =VLOOKUP(A2, tickets_info!$A$2:$N$5000, {2,3,4,5,6,7,8,9,10,11,12,13,14,15}, FALSE)




          • Press Ctrl+Shift+Enter at the same time

          • Autofill down






          share|improve this answer















          I had the same issue and used the following:




          • In the Tickets sheet, Select C2 to O2


          • Without clicking anywhere, start typing:




            =VLOOKUP(A2, tickets_info!$A$2:$N$5000, {2,3,4,5,6,7,8,9,10,11,12,13,14,15}, FALSE)




          • Press Ctrl+Shift+Enter at the same time

          • Autofill down







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 9 '16 at 15:11









          Excellll

          11.2k74164




          11.2k74164










          answered Mar 9 '16 at 14:20









          LauraLaura

          1




          1























              0














              Guess I'm missing something about this, but it looks to me as if you have values on the "second" (output) page in column A and want to find their matching data for columns B through N. They would be a direct match: if a row's A column value exists in the "first" (source) sheet, then its F column value goes in the output sheet row's column F, etc. Some values in the A column on the output sheet will NOT match anything on the source sheet and so that row should be blank.



              If so, just do the VLOOKUP()'s in column B checking for column A's value in the source material's column A and returning the value it finds in column 2 of the source material (column B, in short).



              Note that in the output page's column 2, you want data from column 2 of the source sheet. And so on to the right. Here then is the twist:



              for the column to return argument (3rd argument), do NOT use a hand-typed numeral, but rather " Column() " and each column's cell will get the correct source column's value.



              Nothing more clever than that. Lots of VLOOKUP()'s though, but that's probably OK. My plain vanilla setup is OK with that for 5,000 rows, so my guess would be yours is too.



              But... if it doesn't match anything? Well, use an IF() test for the column B VLOOKUP() and return "" if column A in that row doesn't match anything in the source column A.



              And now, the magic. Who wants to rely on "probably OK" or be held down to 5,000-ish rows, or even double that, then choking? No one.



              Excel evaluates formulas from left-to-right AS MUCH AS it possibly can and STOPS evaluating when it has the result. If it had an IF() test first and its result = TRUE, it would skip anything else and go to the result for TRUE (and stop if that's a "constant" like "8" or "tree" or evaluate what's there if it is itself a function or two. So if you add an IF() test to all the cells in columns C through N like the following:



              =IF( $B2 = "", "", VLOOKUP( $A2, tickets_info!$A$2:$N$5000, COLUMN(), FALSE))


              then ALL those columns rightward from column C will swiftly evaluate to "" if there was no match for the column A value and never do the VLOOKUP()'s! (TRUE in that case is "" which is a constant and needs no further evaluation so Excel stops and displays "".) So no more "probably OK", no choking any time soon. If there are only 943 rows of values to check on the output page, and only 634 of them match on the source page, only 634 * 12 = 7,608 extra VLOOKUP()'s are done, not 5,000 * 12 = 60,000.



              Also, if your source data would never change (once on the source sheet, it might be sorted up or down, but would NEVER be edited), then you could always periodically copy a tranch of the output cells and Paste|Special|Values to do away with their formulas which would further reduce the "load."





              share








              New contributor




              Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
              Check out our Code of Conduct.

























                0














                Guess I'm missing something about this, but it looks to me as if you have values on the "second" (output) page in column A and want to find their matching data for columns B through N. They would be a direct match: if a row's A column value exists in the "first" (source) sheet, then its F column value goes in the output sheet row's column F, etc. Some values in the A column on the output sheet will NOT match anything on the source sheet and so that row should be blank.



                If so, just do the VLOOKUP()'s in column B checking for column A's value in the source material's column A and returning the value it finds in column 2 of the source material (column B, in short).



                Note that in the output page's column 2, you want data from column 2 of the source sheet. And so on to the right. Here then is the twist:



                for the column to return argument (3rd argument), do NOT use a hand-typed numeral, but rather " Column() " and each column's cell will get the correct source column's value.



                Nothing more clever than that. Lots of VLOOKUP()'s though, but that's probably OK. My plain vanilla setup is OK with that for 5,000 rows, so my guess would be yours is too.



                But... if it doesn't match anything? Well, use an IF() test for the column B VLOOKUP() and return "" if column A in that row doesn't match anything in the source column A.



                And now, the magic. Who wants to rely on "probably OK" or be held down to 5,000-ish rows, or even double that, then choking? No one.



                Excel evaluates formulas from left-to-right AS MUCH AS it possibly can and STOPS evaluating when it has the result. If it had an IF() test first and its result = TRUE, it would skip anything else and go to the result for TRUE (and stop if that's a "constant" like "8" or "tree" or evaluate what's there if it is itself a function or two. So if you add an IF() test to all the cells in columns C through N like the following:



                =IF( $B2 = "", "", VLOOKUP( $A2, tickets_info!$A$2:$N$5000, COLUMN(), FALSE))


                then ALL those columns rightward from column C will swiftly evaluate to "" if there was no match for the column A value and never do the VLOOKUP()'s! (TRUE in that case is "" which is a constant and needs no further evaluation so Excel stops and displays "".) So no more "probably OK", no choking any time soon. If there are only 943 rows of values to check on the output page, and only 634 of them match on the source page, only 634 * 12 = 7,608 extra VLOOKUP()'s are done, not 5,000 * 12 = 60,000.



                Also, if your source data would never change (once on the source sheet, it might be sorted up or down, but would NEVER be edited), then you could always periodically copy a tranch of the output cells and Paste|Special|Values to do away with their formulas which would further reduce the "load."





                share








                New contributor




                Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                Check out our Code of Conduct.























                  0












                  0








                  0







                  Guess I'm missing something about this, but it looks to me as if you have values on the "second" (output) page in column A and want to find their matching data for columns B through N. They would be a direct match: if a row's A column value exists in the "first" (source) sheet, then its F column value goes in the output sheet row's column F, etc. Some values in the A column on the output sheet will NOT match anything on the source sheet and so that row should be blank.



                  If so, just do the VLOOKUP()'s in column B checking for column A's value in the source material's column A and returning the value it finds in column 2 of the source material (column B, in short).



                  Note that in the output page's column 2, you want data from column 2 of the source sheet. And so on to the right. Here then is the twist:



                  for the column to return argument (3rd argument), do NOT use a hand-typed numeral, but rather " Column() " and each column's cell will get the correct source column's value.



                  Nothing more clever than that. Lots of VLOOKUP()'s though, but that's probably OK. My plain vanilla setup is OK with that for 5,000 rows, so my guess would be yours is too.



                  But... if it doesn't match anything? Well, use an IF() test for the column B VLOOKUP() and return "" if column A in that row doesn't match anything in the source column A.



                  And now, the magic. Who wants to rely on "probably OK" or be held down to 5,000-ish rows, or even double that, then choking? No one.



                  Excel evaluates formulas from left-to-right AS MUCH AS it possibly can and STOPS evaluating when it has the result. If it had an IF() test first and its result = TRUE, it would skip anything else and go to the result for TRUE (and stop if that's a "constant" like "8" or "tree" or evaluate what's there if it is itself a function or two. So if you add an IF() test to all the cells in columns C through N like the following:



                  =IF( $B2 = "", "", VLOOKUP( $A2, tickets_info!$A$2:$N$5000, COLUMN(), FALSE))


                  then ALL those columns rightward from column C will swiftly evaluate to "" if there was no match for the column A value and never do the VLOOKUP()'s! (TRUE in that case is "" which is a constant and needs no further evaluation so Excel stops and displays "".) So no more "probably OK", no choking any time soon. If there are only 943 rows of values to check on the output page, and only 634 of them match on the source page, only 634 * 12 = 7,608 extra VLOOKUP()'s are done, not 5,000 * 12 = 60,000.



                  Also, if your source data would never change (once on the source sheet, it might be sorted up or down, but would NEVER be edited), then you could always periodically copy a tranch of the output cells and Paste|Special|Values to do away with their formulas which would further reduce the "load."





                  share








                  New contributor




                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.










                  Guess I'm missing something about this, but it looks to me as if you have values on the "second" (output) page in column A and want to find their matching data for columns B through N. They would be a direct match: if a row's A column value exists in the "first" (source) sheet, then its F column value goes in the output sheet row's column F, etc. Some values in the A column on the output sheet will NOT match anything on the source sheet and so that row should be blank.



                  If so, just do the VLOOKUP()'s in column B checking for column A's value in the source material's column A and returning the value it finds in column 2 of the source material (column B, in short).



                  Note that in the output page's column 2, you want data from column 2 of the source sheet. And so on to the right. Here then is the twist:



                  for the column to return argument (3rd argument), do NOT use a hand-typed numeral, but rather " Column() " and each column's cell will get the correct source column's value.



                  Nothing more clever than that. Lots of VLOOKUP()'s though, but that's probably OK. My plain vanilla setup is OK with that for 5,000 rows, so my guess would be yours is too.



                  But... if it doesn't match anything? Well, use an IF() test for the column B VLOOKUP() and return "" if column A in that row doesn't match anything in the source column A.



                  And now, the magic. Who wants to rely on "probably OK" or be held down to 5,000-ish rows, or even double that, then choking? No one.



                  Excel evaluates formulas from left-to-right AS MUCH AS it possibly can and STOPS evaluating when it has the result. If it had an IF() test first and its result = TRUE, it would skip anything else and go to the result for TRUE (and stop if that's a "constant" like "8" or "tree" or evaluate what's there if it is itself a function or two. So if you add an IF() test to all the cells in columns C through N like the following:



                  =IF( $B2 = "", "", VLOOKUP( $A2, tickets_info!$A$2:$N$5000, COLUMN(), FALSE))


                  then ALL those columns rightward from column C will swiftly evaluate to "" if there was no match for the column A value and never do the VLOOKUP()'s! (TRUE in that case is "" which is a constant and needs no further evaluation so Excel stops and displays "".) So no more "probably OK", no choking any time soon. If there are only 943 rows of values to check on the output page, and only 634 of them match on the source page, only 634 * 12 = 7,608 extra VLOOKUP()'s are done, not 5,000 * 12 = 60,000.



                  Also, if your source data would never change (once on the source sheet, it might be sorted up or down, but would NEVER be edited), then you could always periodically copy a tranch of the output cells and Paste|Special|Values to do away with their formulas which would further reduce the "load."






                  share








                  New contributor




                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.








                  share


                  share






                  New contributor




                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.









                  answered 9 mins ago









                  RoyRoy

                  1




                  1




                  New contributor




                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.





                  New contributor





                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






                  Roy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                  Check out our Code of Conduct.






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Super User!


                      • 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%2fsuperuser.com%2fquestions%2f949130%2fhow-to-return-all-the-cells-in-a-row-if-first-column-matches-a-value-on-another%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

                      Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                      Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                      Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...