formula to return two columns of data adjacent to #N/A cell entry

ebsmcb

New Member
Joined
Jun 21, 2023
Messages
8
Office Version
  1. 365
Platform
  1. MacOS
Greetings,

I had help on this forum with this question a month ago, and am following up. Initially, I thought I only needed only the cell entry most adjacent to a #N/A entry. Now I am needed that + the second most-adjacent data as well. Formula suggested was: =TAKE(FILTER(G2:NB2,NOT(ISNA(G2:NB2))),,-1). I tried this: =TAKE(FILTER(G2:NB2,NOT(ISNA(G2:NB2))),,-2) and am getting a

I'll upload the data file for reference. I'm trying to parse multiple complex data files and extract limited information. Data is from acoustic doppler flow data in a river. First three rows have yellow highlights for the data I'm trying to return.

Many thanks!

Eric

data v2.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQARASATAUAVAWAXAYAZBABBBCBDBEBFBGBHBIBJBKBLBMBNBOBPBQBRBSBTBUBVBWBXBYBZCACBCCCDCECFCGCHCICJCKCLCMCNCOCPCQCRCSCTCUCVCWCXCYCZDADBDCDDDEDFDGDHDIDJDKDLDMDNDODPDQDRDSDTDUDVDWDXDYDZEAEBECEDEEEFEGEHEIEJEKELEMENEOEPEQERESETEUEVEWEXEYEZFAFBFCFDFEFFFGFHFIFJFKFLFMFNFOFPFQFRFSFTFUFVFWFXFYFZGAGBGCGDGEGFGGGHGIGJGKGLGMGNGOGPGQGRGSGTGUGVGWGXGYGZHAHBHCHDHEHFHGHHHIHJHKHLHMHNHOHPHQHRHSHTHUHVHWHXHYHZIAIBICIDIEIFIGIHIIIJIKILIMINIOIPIQIRISITIUIVIWIXIYIZJAJBJCJDJEJFJGJHJIJJJKJLJMJNJOJPJQJRJSJTJUJVJWJXJYJZKAKBKCKDKEKFKGKHKIKJKKKLKMKNKOKPKQKRKSKTKUKVKWKXKYKZLALBLCLDLELFLGLHLILJLKLLLMLNLOLPLQLRLSLTLULVLWLXLYLZMAMBMCMDMEMFMGMHMIMJMKMLMMMNMOMPMQMRMSMTMUMVMWMXMYMZNANB
1Sample #Date/TimeMost adjacent to #N/A entry2nd most adjacent entryFrequency (MHz)Profile TypeDepth (m)Cell Size (m)Cell Start (m)Cell1 Location (m)Cell1 Ve (m/s)Cell1 Vn (m/s)Cell1 Vu (m/s)Cell1 Vd (m/s)Cell1 Spd (m/s)Cell1 Dir (deg)Cell2 Location (m)Cell2 Ve (m/s)Cell2 Vn (m/s)Cell2 Vu (m/s)Cell2 Vd (m/s)Cell2 Spd (m/s)Cell2 Dir (deg)Cell3 Location (m)Cell3 Ve (m/s)Cell3 Vn (m/s)Cell3 Vu (m/s)Cell3 Vd (m/s)Cell3 Spd (m/s)Cell3 Dir (deg)Cell4 Location (m)Cell4 Ve (m/s)Cell4 Vn (m/s)Cell4 Vu (m/s)Cell4 Vd (m/s)Cell4 Spd (m/s)Cell4 Dir (deg)Cell5 Location (m)Cell5 Ve (m/s)Cell5 Vn (m/s)Cell5 Vu (m/s)Cell5 Vd (m/s)Cell5 Spd (m/s)Cell5 Dir (deg)Cell6 Location (m)Cell6 Ve (m/s)Cell6 Vn (m/s)Cell6 Vu (m/s)Cell6 Vd (m/s)Cell6 Spd (m/s)Cell6 Dir (deg)Cell7 Location (m)Cell7 Ve (m/s)Cell7 Vn (m/s)Cell7 Vu (m/s)Cell7 Vd (m/s)Cell7 Spd (m/s)Cell7 Dir (deg)Cell8 Location (m)Cell8 Ve (m/s)Cell8 Vn (m/s)Cell8 Vu (m/s)Cell8 Vd (m/s)Cell8 Spd (m/s)Cell8 Dir (deg)Cell9 Location (m)Cell9 Ve (m/s)Cell9 Vn (m/s)Cell9 Vu (m/s)Cell9 Vd (m/s)Cell9 Spd (m/s)Cell9 Dir (deg)Cell10 Location (m)Cell10 Ve (m/s)Cell10 Vn (m/s)Cell10 Vu (m/s)Cell10 Vd (m/s)Cell10 Spd (m/s)Cell10 Dir (deg)Cell11 Location (m)Cell11 Ve (m/s)Cell11 Vn (m/s)Cell11 Vu (m/s)Cell11 Vd (m/s)Cell11 Spd (m/s)Cell11 Dir (deg)Cell12 Location (m)Cell12 Ve (m/s)Cell12 Vn (m/s)Cell12 Vu (m/s)Cell12 Vd (m/s)Cell12 Spd (m/s)Cell12 Dir (deg)Cell13 Location (m)Cell13 Ve (m/s)Cell13 Vn (m/s)Cell13 Vu (m/s)Cell13 Vd (m/s)Cell13 Spd (m/s)Cell13 Dir (deg)Cell14 Location (m)Cell14 Ve (m/s)Cell14 Vn (m/s)Cell14 Vu (m/s)Cell14 Vd (m/s)Cell14 Spd (m/s)Cell14 Dir (deg)Cell15 Location (m)Cell15 Ve (m/s)Cell15 Vn (m/s)Cell15 Vu (m/s)Cell15 Vd (m/s)Cell15 Spd (m/s)Cell15 Dir (deg)Cell16 Location (m)Cell16 Ve (m/s)Cell16 Vn (m/s)Cell16 Vu (m/s)Cell16 Vd (m/s)Cell16 Spd (m/s)Cell16 Dir (deg)Cell17 Location (m)Cell17 Ve (m/s)Cell17 Vn (m/s)Cell17 Vu (m/s)Cell17 Vd (m/s)Cell17 Spd (m/s)Cell17 Dir (deg)Cell18 Location (m)Cell18 Ve (m/s)Cell18 Vn (m/s)Cell18 Vu (m/s)Cell18 Vd (m/s)Cell18 Spd (m/s)Cell18 Dir (deg)Cell19 Location (m)Cell19 Ve (m/s)Cell19 Vn (m/s)Cell19 Vu (m/s)Cell19 Vd (m/s)Cell19 Spd (m/s)Cell19 Dir (deg)Cell20 Location (m)Cell20 Ve (m/s)Cell20 Vn (m/s)Cell20 Vu (m/s)Cell20 Vd (m/s)Cell20 Spd (m/s)Cell20 Dir (deg)Cell21 Location (m)Cell21 Ve (m/s)Cell21 Vn (m/s)Cell21 Vu (m/s)Cell21 Vd (m/s)Cell21 Spd (m/s)Cell21 Dir (deg)Cell22 Location (m)Cell22 Ve (m/s)Cell22 Vn (m/s)Cell22 Vu (m/s)Cell22 Vd (m/s)Cell22 Spd (m/s)Cell22 Dir (deg)Cell23 Location (m)Cell23 Ve (m/s)Cell23 Vn (m/s)Cell23 Vu (m/s)Cell23 Vd (m/s)Cell23 Spd (m/s)Cell23 Dir (deg)Cell24 Location (m)Cell24 Ve (m/s)Cell24 Vn (m/s)Cell24 Vu (m/s)Cell24 Vd (m/s)Cell24 Spd (m/s)Cell24 Dir (deg)Cell25 Location (m)Cell25 Ve (m/s)Cell25 Vn (m/s)Cell25 Vu (m/s)Cell25 Vd (m/s)Cell25 Spd (m/s)Cell25 Dir (deg)Cell26 Location (m)Cell26 Ve (m/s)Cell26 Vn (m/s)Cell26 Vu (m/s)Cell26 Vd (m/s)Cell26 Spd (m/s)Cell26 Dir (deg)Cell27 Location (m)Cell27 Ve (m/s)Cell27 Vn (m/s)Cell27 Vu (m/s)Cell27 Vd (m/s)Cell27 Spd (m/s)Cell27 Dir (deg)Cell28 Location (m)Cell28 Ve (m/s)Cell28 Vn (m/s)Cell28 Vu (m/s)Cell28 Vd (m/s)Cell28 Spd (m/s)Cell28 Dir (deg)Cell29 Location (m)Cell29 Ve (m/s)Cell29 Vn (m/s)Cell29 Vu (m/s)Cell29 Vd (m/s)Cell29 Spd (m/s)Cell29 Dir (deg)Cell30 Location (m)Cell30 Ve (m/s)Cell30 Vn (m/s)Cell30 Vu (m/s)Cell30 Vd (m/s)Cell30 Spd (m/s)Cell30 Dir (deg)Cell31 Location (m)Cell31 Ve (m/s)Cell31 Vn (m/s)Cell31 Vu (m/s)Cell31 Vd (m/s)Cell31 Spd (m/s)Cell31 Dir (deg)Cell32 Location (m)Cell32 Ve (m/s)Cell32 Vn (m/s)Cell32 Vu (m/s)Cell32 Vd (m/s)Cell32 Spd (m/s)Cell32 Dir (deg)Cell33 Location (m)Cell33 Ve (m/s)Cell33 Vn (m/s)Cell33 Vu (m/s)Cell33 Vd (m/s)Cell33 Spd (m/s)Cell33 Dir (deg)Cell34 Location (m)Cell34 Ve (m/s)Cell34 Vn (m/s)Cell34 Vu (m/s)Cell34 Vd (m/s)Cell34 Spd (m/s)Cell34 Dir (deg)Cell35 Location (m)Cell35 Ve (m/s)Cell35 Vn (m/s)Cell35 Vu (m/s)Cell35 Vd (m/s)Cell35 Spd (m/s)Cell35 Dir (deg)Cell36 Location (m)Cell36 Ve (m/s)Cell36 Vn (m/s)Cell36 Vu (m/s)Cell36 Vd (m/s)Cell36 Spd (m/s)Cell36 Dir (deg)Cell37 Location (m)Cell37 Ve (m/s)Cell37 Vn (m/s)Cell37 Vu (m/s)Cell37 Vd (m/s)Cell37 Spd (m/s)Cell37 Dir (deg)Cell38 Location (m)Cell38 Ve (m/s)Cell38 Vn (m/s)Cell38 Vu (m/s)Cell38 Vd (m/s)Cell38 Spd (m/s)Cell38 Dir (deg)Cell39 Location (m)Cell39 Ve (m/s)Cell39 Vn (m/s)Cell39 Vu (m/s)Cell39 Vd (m/s)Cell39 Spd (m/s)Cell39 Dir (deg)Cell40 Location (m)Cell40 Ve (m/s)Cell40 Vn (m/s)Cell40 Vu (m/s)Cell40 Vd (m/s)Cell40 Spd (m/s)Cell40 Dir (deg)Cell41 Location (m)Cell41 Ve (m/s)Cell41 Vn (m/s)Cell41 Vu (m/s)Cell41 Vd (m/s)Cell41 Spd (m/s)Cell41 Dir (deg)Cell42 Location (m)Cell42 Ve (m/s)Cell42 Vn (m/s)Cell42 Vu (m/s)Cell42 Vd (m/s)Cell42 Spd (m/s)Cell42 Dir (deg)Cell43 Location (m)Cell43 Ve (m/s)Cell43 Vn (m/s)Cell43 Vu (m/s)Cell43 Vd (m/s)Cell43 Spd (m/s)Cell43 Dir (deg)Cell44 Location (m)Cell44 Ve (m/s)Cell44 Vn (m/s)Cell44 Vu (m/s)Cell44 Vd (m/s)Cell44 Spd (m/s)Cell44 Dir (deg)Cell45 Location (m)Cell45 Ve (m/s)Cell45 Vn (m/s)Cell45 Vu (m/s)Cell45 Vd (m/s)Cell45 Spd (m/s)Cell45 Dir (deg)Cell46 Location (m)Cell46 Ve (m/s)Cell46 Vn (m/s)Cell46 Vu (m/s)Cell46 Vd (m/s)Cell46 Spd (m/s)Cell46 Dir (deg)Cell47 Location (m)Cell47 Ve (m/s)Cell47 Vn (m/s)Cell47 Vu (m/s)Cell47 Vd (m/s)Cell47 Spd (m/s)Cell47 Dir (deg)Cell48 Location (m)Cell48 Ve (m/s)Cell48 Vn (m/s)Cell48 Vu (m/s)Cell48 Vd (m/s)Cell48 Spd (m/s)Cell48 Dir (deg)Cell49 Location (m)Cell49 Ve (m/s)Cell49 Vn (m/s)Cell49 Vu (m/s)Cell49 Vd (m/s)Cell49 Spd (m/s)Cell49 Dir (deg)Cell50 Location (m)Cell50 Ve (m/s)Cell50 Vn (m/s)Cell50 Vu (m/s)Cell50 Vd (m/s)Cell50 Spd (m/s)Cell50 Dir (deg)Cell51 Location (m)Cell51 Ve (m/s)Cell51 Vn (m/s)Cell51 Vu (m/s)Cell51 Vd (m/s)Cell51 Spd (m/s)Cell51 Dir (deg)
215/16/23 14:43254.548#SPILL!3MHzIC1.260.10.150.2-0.4360.085-0.073-0.1550.444281.0320.3-0.707-0.086-0.058-0.1960.712263.0650.4-0.8380.6210.0070.0211.043306.540.5-0.933-0.216-0.0650.1030.958256.9650.6-0.334-0.162-0.129-0.0530.371244.1250.7-0.740.352-0.068-0.0460.819295.4390.8-0.3610.469-0.0820.0620.592322.4140.9-0.246-0.068-0.1920.050.255254.548#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
325/16/23 14:43293.8913MHzHD1.230.020.110.12-0.5340.2570.0090.0140.593295.70.14-0.5450.2680.0110.0190.607296.1850.16-0.5440.2570.0080.0260.602295.2870.18-0.5510.2550.0070.0270.607294.8340.2-0.5190.2110.030.0660.56292.1240.22-0.5130.2020.0280.0690.551291.4930.24-0.5930.312-0.0140.0050.67297.7510.26-0.5350.2060.0140.060.573291.0590.28-0.5750.26300.0320.632294.5790.3-0.5490.2280.0050.0310.594292.5530.32-0.5540.2240.0060.0370.598292.0150.34-0.5770.219-0.0020.0450.617290.7840.36-0.5550.2290.0040.0380.6292.4220.38-0.5310.2330.0140.0230.58293.6920.4-0.5050.2760.018-0.0160.576298.6580.42-0.4780.2150.0290.0130.524294.2180.44-0.4330.2180.04-0.0030.485296.7240.46-0.4550.2170.032-0.0020.504295.4980.48-0.5690.166-0.0050.0570.593286.2640.5-0.4570.2450.031-0.0110.519298.1960.52-0.570.1760.0030.0650.597287.1590.54-0.4590.2540.031-0.0130.525298.9590.56-0.4520.2150.031-0.0020.501295.4390.58-0.5620.1510.0030.0680.582285.0390.6-0.5020.30.013-0.050.585300.8630.62-0.490.2580.032-0.0320.554297.7680.64-0.5030.2550.031-0.0350.564296.8830.66-0.4740.2640.046-0.0070.543299.1160.68-0.5990.208-0.0050.0460.634289.1490.7-0.510.310.02-0.0290.597301.2930.72-0.490.320.015-0.0050.585303.1470.74-0.5820.276-0.0140.0160.644295.3720.76-0.5570.271-0.011-0.0170.619295.9450.78-0.5510.288-0.016-0.0240.622297.5950.8-0.5270.262-0.024-0.0150.589296.4340.82-0.540.186-0.010.060.571289.0060.84-0.5590.184-0.010.0340.589288.2190.86-0.4990.181-0.0170.0450.531289.9370.88-0.5340.3240.0150.0720.625301.2470.9-0.5220.3250.0130.0750.615301.9070.92-0.4470.196-0.0020.0490.488293.6760.94-0.4760.247-0.0180.0210.536297.4250.96-0.5190.4130.0110.0410.663308.5110.98-0.4820.3890.005-0.0120.619308.9051-0.4870.3540.0140.0180.602306.0131.02-0.4770.3160.001-0.0290.572303.5231.04-0.5830.3790.0130.0680.695303.0271.06-0.5610.3730.0080.0720.674303.6191.08-0.6660.2950.0570.0360.728293.891#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
435/16/23 14:43289.613MHzHD1.220.020.110.12-0.6110.189-0.005-0.0210.64287.1880.14-0.6090.179-0.007-0.0170.635286.3790.16-0.6250.182-0.009-0.0090.651286.2360.18-0.6280.179-0.008-0.0060.653285.9090.2-0.620.161-0.0090.0020.641284.5570.22-0.6160.161-0.0080.0080.637284.6470.24-0.620.155-0.0110.0090.639284.0360.26-0.6110.147-0.0130.0150.628283.5280.28-0.590.146-0.0080.0110.608283.8990.3-0.5640.1530.001-0.0070.584285.1780.32-0.5580.1610.003-0.0120.581286.0940.34-0.5560.1690.001-0.0190.581286.9070.36-0.5580.1750.004-0.0310.585287.4120.38-0.5280.1390.016-0.0070.546284.7490.4-0.5350.1430.013-0.0130.554284.9650.42-0.5470.1530.008-0.0140.568285.6270.44-0.5320.1550.013-0.0270.554286.2440.46-0.5360.1540.01-0.0280.558286.030.48-0.5360.1630.001-0.0340.56286.9150.5-0.5270.1590.002-0.0320.55286.7890.52-0.5270.1770.004-0.0180.556288.5650.54-0.5280.1760.007-0.0070.557288.4350.56-0.5310.1710.008-0.0010.558287.850.58-0.5470.1750.0100.574287.7410.6-0.560.1760.015-0.0060.587287.4470.62-0.5640.1980.014-0.0020.598289.3440.64-0.5790.2070.011-0.0130.615289.6730.66-0.5690.210.01300.607290.2580.68-0.5640.1930.0160.0030.596288.8910.7-0.5530.1910.0090.0050.585289.0540.72-0.5570.1690.009-0.0010.582286.8780.74-0.5470.1530.0020.0030.568285.6270.76-0.5380.1530.0020.0130.559285.8750.78-0.5450.160.0040.0090.568286.3610.8-0.5330.1670.001-0.0070.559287.3970.82-0.540.2030.0010.0040.577290.6030.84-0.5370.180.0070.0150.566288.5310.86-0.5710.1690.0030.0150.595286.4870.88-0.5650.129-0.0010.0330.58282.8610.9-0.6050.182-0.0260.0140.632286.7430.92-0.5850.187-0.0180.0160.614287.7270.94-0.5870.188-0.021-0.0010.616287.7590.96-0.5570.225-0.012-0.0310.601291.9960.98-0.5920.211-0.026-0.0070.628289.6171-0.5830.201-0.026-0.0010.617289.0231.02-0.5030.159-0.027-0.0080.528287.5421.04-0.4940.176-0.0280.0110.524289.61#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A#N/A
Sheet1
Cell Formulas
RangeFormula
D2D2=TAKE(FILTER(G2:NB2,NOT(ISNA(G2:NB2))),,-2)
C2:C4C2=TAKE(FILTER(G2:NB2,NOT(ISNA(G2:NB2))),,-1)
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Clear the formula from D2 & use this in C2
Excel Formula:
=CHOOSECOLS(FILTER(G2:NB2,NOT(ISNA(G2:NB2))),-1,-2)
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,198
Members
452,617
Latest member
Narendra Babu D

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top