• 100% Satisfaction Guarantee

Jess M., Computer Support Specialist
Category: Microsoft Office
Satisfied Customers: 5889
Experience:  Computer Software Specialist for more than 10 years
49766785
Type Your Microsoft Office Question Here...
Jess M. is online now

# I have a series of 10 cells that use a VLOOKUP statement to

I have a series of 10 cells that use a VLOOKUP statement to return a value in each of the ten cells - in another cell within this sheet I am trying to return the most recent value of these ten cells (or the last value listed), the problem is that within the ten cells they are not all filled in - so I am trying a nested IF statement to check the 10th cell and if there is a value then return that value, if no value then check the 9th cell and so on until I find a value and then have it returned. Obviously it is not working!

VLOOKUP statement: =IFERROR(VLOOKUP(\$A4,Array10,12,FALSE),"")

Nested IF statement: =IFERROR(IF(W4,W4,IF(V4,V4,IF(U4,U4,IF(T4,T4,IF(S4,S4,IF(R4,R4,IF(Q4,Q4,IF(P4,P4,IF(O4,O4,IF(N4,N4,"")))))))))),"")
Hi, welcome and thank you for your question. My name is XXXXX XXXXX I am glad to assist you today.

Can you send a sample of your Excel file to me so that I can work on them directly? If this is possible, upload the sample Excel file to http://wikisend.com then give me the 6-digit File ID or download link so that I can get your sample file.

Best regards,
Jess
Customer: replied 3 years ago.

Attachment: 2013-08-26_165720_sample_book.xlsx

I used the paper clip to load the file - hopefully you received it.

The book opens up to the sheet I am working on.

In cell F4 is my IF statement to return the 'most recent' value within the range of 10 cells (N4:W4) checking them in reverse order.

Steve,

Jess
Customer: replied 3 years ago.

Hi Jess, are you still working on my problem? I thought this was an easy one for you?

Steve,

I am still working on this. Please give me some time since I am looking for other means to solve the problem without using nested IFs.

Jess
Customer: replied 3 years ago.

OK Thanks!!!! Just checking!

Steve,

There is a cleaner and better approach to this without using nested ifs. But it only works from LEFT to right.

That is, can we list the data in columns N to W in reverse order? That is, column N will be 12 Post 2 while column W will be 9 Pre.

Let me know.
Jess
Customer: replied 3 years ago.

Obviously I can do that but it would not be easy to change at this point and it would not make as much sense to our teachers using the program. If your approach works left to right can it check the 10 cells for the first 'empty cell' and then return the value in the previous cell?

Steve,

Based on your problem description, the reported cell must be the RIGHTMOST cell in the 10-cell range. The approach only works LEFTMOST.

That is, if the 10 cells are filled, cell N will be shown. If cell N is blank, the next NON-empty cell will be displayed. And so on in that pattern.

Jess
Customer: replied 3 years ago.

I am sorry for being a pain again but I really do not want to reverse the order of my cells if at all possible - so I am sure you have already considered this but I am going to ask anyway -

Is there a way to check in a range of 10 cells if a cell is filled (has a value from the VLOOKUP statement) and continue checking for filled cells until it encounters an empty cell, record the 'index' of the empty cell and return the previous cell (index-1)?

Customer: replied 3 years ago.

Hi Jess, obviously you are working on other people's problems as well as mine - just wondering where my problem status is?

Hi Steve,

I am sorry for the late reply. I am still working on this as you really wanted the right-to-left approach. I already have a clean formula but it will only work from left to right.

I will not be using nested ifs, if possible.

Regards,
Jess
Hi Steve,

Thank you for patiently waiting. I have completed it successfully. The formula I used is an array formula, so if you enter an array formula, while the cursor is in the formula bar, press CTRL+SHIFT+Enter instead of just pressing Enter. Doing that appends the curly braces in the formula itself to indicate it is an array.

The formula is:
=INDEX(N4:W4,MATCH(9.99999999999999E+307,N4:W4))

When Ctrl+Shift+Enter is pressed, the formula will become:
{=INDEX(N4:W4,MATCH(9.99999999999999E+307,N4:W4))}

You can then drag the formula down to copy it.

That formula will actually look for the LAST non-blank cell in the row range from left to right, that is exactly what you require.

Here is my sample file:
http://www.filedropper.com/samplebookrev1

Please remember to rate my service positively (3-5 stars/faces) once you have all the information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Customer: replied 3 years ago.

That appears to work great for my mile time but it did not work for the other three categories (push ups / sit ups etc.) in my spreadsheet? The other three areas are just numbers no decimal points and no time format - is there a quick adjustment to your formula so that it works on numbers and not a time format?

As always thanks for your time and help.

Hi Steve,

I have completed the formula in the other 3 columns and they just worked just fine. You just need to adjust the range of the columns involved.

Also, I added IFERROR function to avoid the #N/A error when all cells in the row are blank.

For column F:
=IFERROR(INDEX(N4:W4,MATCH(9.99999999999999E+307,N4:W4)),"")

For column H:
=IFERROR(INDEX(X4:AG4,MATCH(9.99999999999999E+307,X4:AG4)),"")

For column J:
=IFERROR(INDEX(AH4:AQ4,MATCH(9.99999999999999E+307,AH4:AQ4)),"")

For column L:
=IFERROR(INDEX(AR4:BA4,MATCH(9.99999999999999E+307,AR4:BA4)),"")

Please remember to rate my service positively (3-5 stars/faces) once you have all the information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Customer: replied 3 years ago.

Thanks everything seems to be working just as I needed!!!!

I have just one more HOPEFULLY quick question and if it is not please do not spend any time working on it as I can always work around it.

In column G I am trying to return the BEST mile time so I am using the formula below which works perfect except for when the returned time is 0.00 which of course now becomes the best time - so my question is can we add an IF statement to ignore 0.00 and return the actual lowest time skipping over any 0.00s???

=IFERROR(MIN(\$N6:\$W6),"")

Steve,

Thank you for writing back.

In this case, you can enclose your MIN function with an IF like this:
=IF(MIN(\$N5:\$W5)=0,"",MIN(\$N5:\$W5))

In that case, if the MIN function gives 0:00 since it is indeed the minimum, it will display blank instead of the 0:00 time.

If you still want the IFERROR, the final formula will be:
=IFERROR(IF(MIN(\$N4:\$W4)=0,"",MIN(\$N4:\$W4)),"")

Here is the completed file:

Please remember to rate my service positively (3-5 stars/faces) once you have all the information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Customer: replied 3 years ago.

I am so sorry to bother you yet again - it does exactly what you said it would do but that is not what I was hoping for - in other words if the formula encounters a '0' I need that to be ignored and continue checking for the best time that is not '0'. It returns a blank due to the '0' but I need the best time.

I have included a spreadsheet that displays what I am looking for better than the one you have. So B3 is your formula and the range of ten cells M3:V3.

Attachment: 2013-08-27_172543_sample.xlsx

If this new requirement is too much work please disregard as I am sure you have better things to do,

Steve,

Is this referring to another formula in your worksheet already? I was working with the source formula for column G?

Jess
Customer: replied 3 years ago.

No it is a slightly different worksheet that I was experimenting with I just removed the first few rows so B3 is the EXACT same thing as G3 and the range is M3:V3 instead of N3:W3 this sheet just has more data is all.

Sorry for the confusion - sheet 1 actually has the 0.00 (V3) for a mile time that I would like to ignore.

Steve,

In this case, you need another array formula to test the NON-ZERO numbers only, that is, cell values greater than zero.

Here is the array formula in your new file:
=MIN(IF(M3:V3>0,M3:V3))

In cell B3, 5:15 is shown instead of 0:00.

Please remember to rate my service positively (3-5 stars/faces) once you have all the information you need. Tips are always highly appreciated!

If you have any other questions, please ask me or reply to me – I’ll be happy to respond.

Thank you!

Best regards,
Jess
Jess M., Computer Support Specialist
Category: Microsoft Office
Satisfied Customers: 5889
Experience: Computer Software Specialist for more than 10 years
Customer: replied 3 years ago.

THANKS JESS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I will not bother you anymore!!!!!!!

Lol!

No problem Steve... I am glad to be of help. If you need assistance in the future, you can request me any time.

Best regards,
Jess

Ask-a-doc Web sites: If you've got a quick question, you can try to get an answer from sites that say they have various specialists on hand to give quick answers... Justanswer.com.
...leave nothing to chance.
Traffic on JustAnswer rose 14 percent...and had nearly 400,000 page views in 30 days...inquiries related to stress, high blood pressure, drinking and heart pain jumped 33 percent.
Tory Johnson, GMA Workplace Contributor, discusses work-from-home jobs, such as JustAnswer in which verified Experts answer people’s questions.
I will tell you that...the things you have to go through to be an Expert are quite rigorous.

### What Customers are Saying:

• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
< Previous | Next >
• My Expert answered my question promptly and he resolved the issue totally. This is a great service. I am so glad I found it I will definitely use the service again if needed. One Happy Customer New York
• Wonderful service, prompt, efficient, and accurate. Couldn't have asked for more. I cannot thank you enough for your help. Mary C. Freshfield, Liverpool, UK
• This expert is wonderful. They truly know what they are talking about, and they actually care about you. They really helped put my nerves at ease. Thank you so much!!!! Alex Los Angeles, CA
• Thank you for all your help. It is nice to know that this service is here for people like myself, who need answers fast and are not sure who to consult. GP Hesperia, CA
• I couldn't be more satisfied! This is the site I will always come to when I need a second opinion. Justin Kernersville, NC
• Just let me say that this encounter has been entirely professional and most helpful. I liked that I could ask additional questions and get answered in a very short turn around. Esther Woodstock, NY
• Thank you so much for taking your time and knowledge to support my concerns. Not only did you answer my questions, you even took it a step further with replying with more pertinent information I needed to know. Robin Elkton, Maryland

• ### jstinehelfer

#### Satisfied Customers:

36
A+ Comptia Certified computer repair
< Last | Next >

### jstinehelfer

#### Satisfied Customers:

36
A+ Comptia Certified computer repair

### JasonJames122

#### Satisfied Customers:

0
I manage all information systems (network of Windows PC's and servers with Microsoft Office products) for a small business

### Jess M.

#### Satisfied Customers:

552
Computer Software Specialist for more than 10 years

### The-PC-Guy

#### Satisfied Customers:

496
20 years experience providing remote computer support

### James K.

#### Satisfied Customers:

260
Technical Director of IT Company

### IT Miro

#### Satisfied Customers:

151
Bachelor's Degree in Information Technology, Microsoft Certified Professional