Hi Paco,
If I understand you correctly, you're looking to characterize the average column density with z direction in your 3D slab sim (like height off of the disk by looking at an edge-on galaxy).
The column density is intrinsically a valued measure along a line of sight, a projected density. So yes, you can select the cells in a range of z coordinates, and then multiply their ion number densities by their cell widths to get a column density value for each of those cells. But an observer would see the sum of those column density values along a given line of sight, so you would only co-add the column density of the cells all intersecting a single line of sight (like all cells sharing a single x coordinate). Obviously the number of cells contributing to this line of sight will directly impact its total column density, so you should make sure that your slab simulation is the appropriate size to represent whatever structure you're trying to approximate the column density of (e.g., galactic disk).
Again, I'm not exactly sure what you're doing, but if you're trying to characterize the "average" column density that an observer sees through a layer in z (i.e. scale height off the disk), I would multiply the ion number density for each cell in your z-layer by its width, to get an ion column density for each cell. Then average all of those together to get an average ion column density per cell, and then figure out how many cells a typical sightline would be piercing (e.g., how wide is your disk) and multiply it by that to get a predicted total column density of a particular ion for that z layer when viewed along the x or y axes.
I hope this helps!
Cameron