Matching a value and returning location of next empty cell

jwilson28 3 Posts Friday April 21, 2017Registration date December 5, 2017 Last seen - Dec 5, 2017 at 04:31 PM - Latest reply: ac3mark 8371 Posts Monday June 3, 2013Registration dateModeratorStatus December 15, 2017 Last seen
- 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
See more 

1 reply

Reply to this topic
ac3mark 8371 Posts Monday June 3, 2013Registration dateModeratorStatus December 15, 2017 Last seen - Dec 5, 2017 at 05:13 PM
0
Helpful
Take a look here:
http://ccm.net/faq/53497-how-to-manipulate-data-in-excel-using-vba

^
That should take care of the "empty cell" problem.
Respond to ac3mark