Function for checking a cell and if it holds text "N/A" move right to next cell

jackson1990

Board Regular
Joined
Feb 21, 2017
Messages
56
Hey everyone!

I'm working through a little but of an issue. Trying to think of a way to write a function that will cause it to check the cell to the right of it and if it has "N/A" to skip that cell and move to the cell to the right of it check that cell if it has N/A then move to the right, until it finds one that actually has a date in it.

How it is set up as follows: Someone puts in a final date (when it needs to be finished by) this is manually entered. We'll just use and example here of 5/15/2018. I think use a mix of a if,sum, and vlookup in the cell to the left of it to minus days off for the milestone before that (say the mile stone before final date is like editing) so to the left of the final date I have this function.

Code:
=IF(SUM(AC2-VLOOKUP($L$2,Table1[#All],COLUMN()-20,FALSE))=AC2,"N/A",SUM(AC2-VLOOKUP($L$2,Table1[#All],COLUMN()-20,FALSE)))
AC2 is the final date, it vlookups to a table with a bunch of numbers, finds the right number to minus off, brings it back and minuses that number of days off. It also is checking to see if the cell to the right and this current cell are equal (as in having the same date), and if they are it puts N/A in the cell.

What I want to be able to do is for it to check "AC2" (in this case) to see if it is N/A, if it is N/A then I want it to skip to the cell to the right of it, as many times as it has to till it finds a date. Is this possible?

Thanks in advance!!!
 
Thanks Aladin! I made some changes to how my spreadsheet worked, but it was your logic that helped me solve it! So, thank you for working through it with me.
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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