+ Reply to Thread
Results 1 to 21 of 21

Formulas to Retrieve Data from Columns

  1. #1
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Formulas to Retrieve Data from Columns

    I am attaching a worksheet. For some reason some of the formulas's work (series) and some don't (games). For those columns that I could not get to work, I did not copy the formula down the column, but I have put the formula in the first row where the info is suppose to be entered. Any help in getting this to work, I would appreciate it.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formulas to Retrieve Data from Columns

    The formula works for numbers. Some values are listed as text.
    You can add 0 (zero) to the SUBSTITUTE argument in formulas as in column K.
    For example, K2 would be like this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Then copy down.

    Good luck!

  3. #3
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    How do I get all numbers to be numbers?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,869

    Re: Formulas to Retrieve Data from Columns

    Try this (untested):

    =--IF(I2>=12,IF($J2<=100,0+SUBSTITUTE(IF($D3>=125,","&$D3,"")&IF($E3>=125,","&$E3,"")&IF($F3>=125,","&$F3,""),",","",1),""),"")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    I tried the above formula and I could not get it to work. I have retyped the entire worksheet and make the columns number columns before typing in the information
    and I still cannot get this to work. I am so frustrated and would really like someone to help. It appears that the Score Column AH (100 Avg w/125 Gm)
    is not picking up the information from Column K (100 Avg w/125 Game). The score column AH should show scores of 127, and two 125 games. Because I retyped the entire
    worksheet I am attaching the new one. I believe if I can get the Column K to record scores in Column AH I would be able to get the rest to work. Any help would be appreciated.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formulas to Retrieve Data from Columns

    The formula in K177, which results 125, had not been changed as suggested. That's why nothing showed in column AH.

    Try this in K177:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I added IFERROR to hide error message when formula results blank.

  7. #7
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    I am still having problems,, but want to thank you very much for your help so far. With your help I made progress. However, I have two columns that I cannot get to work. I am probably just not seeing the mistake I have made.
    Hopefully another set of eyes can help me. The two "ID#" columns I cannot get to work are: AS for 140 Avg w/175 game (M) and BW for Series 140 Pins Over Avg (S).
    I get "N/A" instead of the ID number. I am again attaching my worksheet since I was able to make changes to the other columns that worked thanks to your help.
    Attached Files Attached Files
    Last edited by viclea; 10-14-2021 at 11:46 PM.

  8. #8
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    I really would like to understand why there are three computations in my worksheet that just don't seem to work and I really want to find the solution.

    In Column AS (ID #) (140 Avg w/ 175 Game), the bracketed formula is[=IF(AR2="","",SMALL(IF(INDEX($M$2:$M$600,,MATCH(LEFT(AQ2,FIND("#",AQ2)-2),$M$1:$M$1,0))=AR2,ROW($M$2:$M$600)),COUNTIF(AR$2:AR2,AR2)))] -- but it doesn't work. In Column AN (ID #) (120 Avg w/150 Game) the bracketed formula is [=IF(AM2="","",SMALL(IF(INDEX($L$2:$L$600,,MATCH(LEFT(AL2,FIND("#",AL2)-2),$L$1:$L$1,0))=AM2,ROW($L$2:$L$600)),COUNTIF(AM$2:AM2,AM2)))] -- this one works. Why do they both not work?
    ,
    The next problem is in column BQ (Score) (45 pins over average). If I use the formula [=IFERROR(LARGE($R$2:$R$600,ROW(BQ1)),(""))] I get a blank cell. If I put in the cell number [=R33], I get an avg from column 4 plus the next three columns with formulas work.

    The last column with a problem is column BV where using the same formula as above except using column S and BV, it works, but BW doesn't work.

    This is a real mystery and I would really like to get this working. I have downloaded the file on my previous entry. I did not get any responses and so I have expanded by narrative in hopes that someone out there will be able to answer my questions/problems.

    Thank you.
    Last edited by viclea; 10-17-2021 at 08:39 AM.

  9. #9
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    AS2: match() is not finding "140 Avg w/175 Gm" in cell M1 because M1 says: "140 Avg w/175 Game" "Gm" doesn't match "Game"

    BQ2: large() fails because ALL "numbers" in col-R are text. Fix as explained in posts #2, 4 and/or 6

    BW2: match() is not finding "Series 140 Pins Over Avg" in cell S1 because "Series 140 Pins Over Avg " in S1 has a spurious 'space' character at the end of the text.
    Geoff

    Did I help significantly? If you wish, click on * Add Reputation to say thanks.
    If your problem has been resolved please select ?Solved? from the Thread Tools menu

  10. #10
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    Geoff, thank you so much for all the help. AS2 and BW2 are now correct. However, I understand adding the "iferror" and "substitute", but because there are three if statements, I am not sure how to add these two formulas to the current formula.

  11. #11
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    First of all, thanks for the rep

    I'm going to ask a question to test my understanding of what you expect before I say anything else!

    If col-R of your workbook was populated as follows with all other rows in col-R being blank:

    Cell R2: 10
    Cell R3: 20 30
    Cell R4: 25

    What would your expected values be for cells BQ2, BQ3, BQ4, BQ5?

  12. #12
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    Geoff, I am not sure where you got the above figures, so I am attaching the up-to-date worksheet showing the following and what the results should show.

    R33 - 178
    BQ2 - 178(Score)
    BR2 - 33 (ID#)
    BS2 - 2 (Position of Name in List)
    BT2 - BB BA (Full Name)

    and

    R10 177
    BQ3 - 177 (Score)
    BR3 - 10 (ID#)
    BS3 - 1 (Position of Name in List)
    BT3 - AA BB (Full Name)
    Attached Files Attached Files

  13. #13
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    Sorry, my question was based on a fictitious hypothetical example that was just trying to boil down an example to its simplest possible terms.

    There are instances in col-R where you have more than one number in a cell, for example R374 looks like: 250 250 250
    I'm just trying to figure out how you expect col-BQ to deal with this circumstance.

    So back to my post #11 question:
    (a) would you expect:
    BQ2: 25
    BQ3: 10
    BQ4: blank
    BQ5: blank

    or (b) would you expect:
    BQ2: 30
    BQ3: 25
    BQ4: 20
    BQ5: 10

    (a) is what would actually happen, but I suspect you may be looking for (b) to happen (or maybe something else!).

  14. #14
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    The chances of the same number is all three columns is slim to none. I used that number in order to get a result in a different column. Therefore, what I want to happen is:

    BQ 2 is the highest score that will be picked up from column R
    BQ 3 is the the next highest score that will be picked up from Column R

    so I guess that would mean I would expect your (b). However, once the numbers from Column R are gone, I want the columns BQ 4-32 to show nothing at all.
    Last edited by viclea; 10-18-2021 at 05:02 PM.

  15. #15
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    "BQ 2 is the highest score that will be picked up from column R"
    The catch is that the large() function in column-BQ will IGNORE column-R cells that contain 2 or more "numbers". I put "numbers" in quotes because a cell like: "123 456" does not contain 2 real numbers it contains a single text string "123 456" and the large() function ignores cells containing text.

    Given the nature of the formula in Column-R, a single cell in that column can contain one or two or three numbers. When there is more than number in a single column-R cell then the col-BQ formula will NOT work as you wish. The large() function in column-BQ will ONLY consider cells that contain a SINGLE number and ENTIRELY IGNORE all column-R cells that contain two or three numbers (that are in fact NOT really numbers, they are just text that looks like numbers).

    If you really need two or more "numbers" in a single column-R cell then I don't see a way to get Column BQ to behave the way you want. Is multiple numbers in a single cell a firm requirement? If not is there a simpler approach? Maybe something like =max(D3:F3) in column-R ??

  16. #16
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    Column R works, however, it does not work with BQ, which is the problem. As I stated before, I only used the three large scores to make a different column work. The chances of a single
    line in column R having more than one score is remote and I can deal with it if it happens. I have deleted the one score of three identical scores. Column R takes scores from lines in Columns D:F. It
    sees if any of them are 45 pins over average. If it is 45 pins over average, then it will appear in Column R and in order by highest to lowest in Column BQ. Then in column BR through BT
    it will give me the information of who the person is. Since my columns seem to be text, not numerical, I was told to use the substitute formula, but I do not know how to use that
    formula when the information is gathered from three different columns. The important thing is that all three columns (D:F) will not show multiple numbers in Column R.

    I am again attaching my worksheet.

    Here is what I want in column BQ - BT:

    Line# BQ BR BS BT
    2. 251 373 18 RR RA
    3. 200 353 17 QQ QA
    4. 194 140 7 GG AG

    Continuing down until all the scores in Column R are filled in in Columns BQ - BT.

    Hopefully you can understand what I am saying.
    Attached Files Attached Files
    Last edited by viclea; 10-18-2021 at 10:30 PM.

  17. #17
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    "The important thing is that all three columns (D:F) will not show multiple numbers in Column R."
    OK, I have a brand new column-R formula for you. It is simpler, it does not have the "text-that-looks-like-a-number" problem and, most importantly, it matches your col-BQ expected results

    In R3 copied down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    BR2 is 374 vs your expected result of 373, but as the 251 value comes from row-374 then I think 374 is the correct result. Cols BS and BT match your expected results.

    The attached workbook is your post #16 attachment with the above mentioned changes made.

    Hopefully (very hopefully ) this works for you. Let us know.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    Thank you Geoff. That works fantastic and such a simple formula.

  19. #19
    Registered User
    Join Date
    12-04-2018
    Location
    Washington State, USA
    MS-Off Ver
    Microsoft Office 365
    Posts
    64

    Re: Formulas to Retrieve Data from Columns

    I want to thank everyone who helped with my project. I really appreciate all your input.

  20. #20
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,616

    Re: Formulas to Retrieve Data from Columns

    Thanks for the feedback - really glad it works for you!

  21. #21
    Forum Expert
    Join Date
    06-05-2017
    Location
    Brazil
    MS-Off Ver
    Microsoft 365 Version 2404
    Posts
    1,259

    Re: Formulas to Retrieve Data from Columns

    Hi! Been away at sea with limited internet service, but I'm glad this thread has had a happy ending.

    You guys take care and be safe.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Combine formulas to retrieve data in one go
    By mikehk in forum Excel General
    Replies: 4
    Last Post: 03-05-2021, 04:57 AM
  2. [SOLVED] Retrieve data in a table with formulas
    By Arkine in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-28-2019, 01:37 PM
  3. Replies: 2
    Last Post: 10-11-2017, 05:43 PM
  4. Search 4 columns of data for a match and retrieve from a 5th column
    By P Hawk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-29-2015, 05:38 PM
  5. [SOLVED] macro, retrieve data to specific columns
    By Leoparddd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-23-2014, 11:22 AM
  6. How to Retrieve the Latest Data from staggered Columns from a Row?
    By tamiliam in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-20-2012, 07:52 PM
  7. [SOLVED] Workaround to retrieve data from closed workbooks by using formulas.
    By all4excel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-08-2008, 08:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1