Matching a value and returning location of next empty cell

Closed
jwilson28 Posts 3 Registration date Friday April 21, 2017 Status Member Last seen December 5, 2017 - Dec 5, 2017 at 04:31 PM
 Blocked Profile - Dec 5, 2017 at 05:13 PM
Hi all

I'm new here and I have been really stuck on this for ages, I'd really appreciate any help.

I'm trying to write a macro which will work through the cells from C5:K84, to find a value that matches the one in O4 and then return the cell location of the next empty cell in the row, up to column K, into cell P4. If there isn't an empty cell I would like it to drop down a row and try and find a matching value in that row and then return the location of the next empty cell, if there is one up to column K and carry on until row 84.

I don't know if I should be using a MATCH or INDEX or both. I have just been spending days searching the internet for something that would work.

Thanks for reading, and again I would be very grateful for any advice.

Thanks

Jon

1 response

Blocked Profile
Dec 5, 2017 at 05:13 PM
Take a look here:
https://ccm.net/faq/53497-how-to-manipulate-data-in-excel-using-vba

^
That should take care of the "empty cell" problem.
0