Need Help Please..... need and IF function or a Formula to assist

%3CLINGO-SUB%20id%3D%22lingo-sub-2832204%22%20slang%3D%22en-US%22%3ENeed%20Help%20Please.....%20need%20and%20IF%20function%20or%20a%20Formula%20to%20assist%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2832204%22%20slang%3D%22en-US%22%3E%3CP%3EFormulas%20to%20assist%20snippet%20below%3C%2FP%3E%3CP%3EI'm%20trying%20to%20figure%20out%20if%20Values%20in%20K%20column%20falls%20in%20between%20column%20D%20and%20E%3F%3F%20and%20have%20it%20present%2C%20in%20comumn%20F%2C%20if%20the%20turnout%20values%20is%20present%20between%20the%20upper%20and%20lower%20limit.%3C%2FP%3E%3CP%3EColumn%20D%20being%20the%20lower%20limits%20for%20that%20particular%20chainage%20and%20E%20the%20Upper%20limit.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22ExcelNovice365_0-1633912869931.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316426i436DF7BB8DE4A010%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22ExcelNovice365_0-1633912869931.png%22%20alt%3D%22ExcelNovice365_0-1633912869931.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20want%20a%20formula%20to%20help%20out%20but%20I'm%20no%20expert%20in%20this%2C%20been%20trying%20to%20use%20If%20and%20function%20but%20doesn't%20seem%20right%20because%20there%20are%20multiple%20values%20of%20the%20turn%20out(%20columnK)%3F%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3DIF(AND(D2%26lt%3B%24K%242%2CE2%26gt%3B%24K%242)%2C%22Turnout%22%2C%22%22)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20I%20want%20to%20use%20all%20the%20turn%20out%20chainages%3F%3F%3F%3F%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20Help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2832204%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2832892%22%20slang%3D%22en-US%22%3ERe%3A%20Need%20Help%20Please.....%20need%20and%20IF%20function%20or%20a%20Formula%20to%20assist%20%7C%20transposed%20chainages%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2832892%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1181481%22%20target%3D%22_blank%22%3E%40ExcelNovice365%3C%2FA%3E%26nbsp%3B--%20%3CEM%3ESince%20you%20did%20not%20provide%20a%20file%2C%20I%20created%20my%20own%20data%20for%20illustration%20purposes.%20I%20hope%20its%20close%20enough%20to%20your%20actual%20data%20to%20understand.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20concluded%20that%20you%20need%20to%20re-structure%20your%20data%20such%20that%3A%3C%2FP%3E%3COL%3E%3CLI%3Ethe%20LIMITS%20and%20CHAINAGES%20tables%20are%20combined%20into%20a%20single%20table%20eg%20%22TurnoutDecision%22%2C%20and%3C%2FLI%3E%3CLI%3Ethe%20CHAINAGES%20values%20need%20to%20be%20TRANSPOSED%20and%20cast%20as%20HEADERS%3C%2FLI%3E%3C%2FOL%3E%3CP%3EOnce%20the%20above%20has%20been%20completed%2C%20you%20merely%20need%20to%20reference%20the%20VALUE(HEADER)%20in%20the%20CHAINAGES%20portion%20of%20the%20table%20and%20compare%20against%20the%20LOCATION%201%20%26amp%3B%202%20with%20an%20IF%2FAND%20combo%20statement%2C%20throwing%20a%20%221%22%20where%20the%20VALUE(HEADER)%20meets%20the%20BETWEEN%20conditions%20for%20Location%201%2C%20Location%202%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22transpose_solution.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316445i3D04D58C55967D5E%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22transpose_solution.png%22%20alt%3D%22transpose_solution.png%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3ENote%20we%20WRAP%20the%20HEADER%20reference%20in%20VALUE%20in%20order%20to%20convert%20the%20TEXT%20format%20that%20is%20forced%20upon%20HEADER%20items.%20Without%20the%20VALUE()%20function%2C%20you'll%20get%20nowhere%20fast.%3CBR%20%2F%3E%3CBR%20%2F%3ENext%2C%20the%20TurnoutTest%20Column%20performs%20a%20SUM%20on%20all%20CHAINAGES%20on%20the%20ROW%3A%3CBR%20%2F%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22sum_trpose.PNG%22%20style%3D%22width%3A%20902px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316449i3E625006D82D7BC3%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22sum_trpose.PNG%22%20alt%3D%22sum_trpose.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3EFinally%2C%20the%20%22Turnout%20or%20Not%22%20column%20performs%20an%20IF%20on%20the%20TurnoutTest%20value%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22turnout.PNG%22%20style%3D%22width%3A%20537px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F316450i0CDF2737C9CD7046%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22turnout.PNG%22%20alt%3D%22turnout.PNG%22%20%2F%3E%3C%2FSPAN%3E%3CBR%20%2F%3EOf%20course%2C%20COL%20F%20%26amp%3B%20G%20are%20oversimplified%20here%20for%20the%20purposes%20of%20illustration.%3CBR%20%2F%3EI%20challenge%20you%20to%20combine%20the%20%22TurnoutTest%22%20%26amp%3B%20%22Turnout%20Or%20Not%22%20columns%20into%20a%20single%20column.%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ESee%20the%20attached%20file.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3E%3CEM%3ELastly%2C%20if%20you%20need%20help%20TRANSPOSING%20tables%20data%20I%20suggest%20referencing%20this%3A%3C%2FEM%3E%20%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F60266169%2Fdynamic-arrays-spill-horizontally%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F60266169%2Fdynamic-arrays-spill-horizontally%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%2FC%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Formulas to assist snippet below

I'm trying to figure out if Values in K column falls in between column D and E?? and have it present, in comumn F, if the turnout values is present between the upper and lower limit.

Column D being the lower limits for that particular chainage and E the Upper limit. 

ExcelNovice365_0-1633912869931.png

 

Now I want a formula to help out but I'm no expert in this, been trying to use If and function but doesn't seem right because there are multiple values of the turn out( columnK)?? 

 

=IF(AND(D2<$K$2,E2>$K$2),"Turnout","")

 

but I want to use all the turn out chainages????? 

 

Please Help.

 

2 Replies

@ExcelNovice365 -- Since you did not provide a file, I created my own data for illustration purposes. I hope its close enough to your actual data to understand.

 

I have concluded that you need to re-structure your data such that:

  1. the LIMITS and CHAINAGES tables are combined into a single table eg "TurnoutDecision", and
  2. the CHAINAGES values need to be TRANSPOSED and cast as HEADERS

Once the above has been completed, you merely need to

  1. reference the VALUE(HEADER) in the CHAINAGES portion of the table, 
  2. compare against the LOCATION 1 & 2 with an IF/AND combo statement,
    throw a "1" where the VALUE(HEADER) meets the BETWEEN conditions for Location 1, Location 2:

    transpose_solution.png

    Note we WRAP the HEADER reference in VALUE in order to convert the TEXT format that is forced upon HEADER items into a NUMERAL for SUM purposes. Without the VALUE() function, you'll get nowhere fast.

    Next, the TurnoutTest Column performs a SUM on all CHAINAGES by ROW(s):
    sum_trpose.PNG
    Finally, the "Turnout or Not" column performs an IF on the TurnoutTest value:

turnout.PNG
Of course, COL F & G are oversimplified here for the purposes of illustration.
I challenge you to combine the "TurnoutTest" & "Turnout Or Not" columns into a single column.


See the attached file.

Lastly, if you need help TRANSPOSING tables data I suggest referencing this: https://stackoverflow.com/questions/60266169/dynamic-arrays-spill-horizontally

/C

THANK YOU THANK YOU, This makes sense.