# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  > [SOLVED] Add numbers to cells before the first and after the last value in row

## Wickan

Hi!

I have a question regarding adding numbers in a chart. I have a list of dates and numbers, I would like to add a fixed number (21 is just an example but it can be the same number all across the board) before the first and after the last value in each row. I can't really figure out a way to do this without going over each row individually. I have about 2.000 rows so that would be a pain.

Thanks in advance

----------


## jme1013

We need more info. what is the criteria that causes the numbers to generate? Just a blank space? We need to know the "Why".

----------


## Wickan

Thank you for your reply.

 The value should be added before the first current value in each row and after the last current value in the row. It can be any number as long as Its greater than 0. 

So, I want to extend each row with 2 values directly in front and behind the first and last current values in each row. I know im describing it poorly but not sure how to out it in any other way.

Thanks in advance

----------


## Andy Pope

You could use formula to check cells and output either the cell value, fixed value or #N/A so the datapoint is ignored.

You will need slightly different formula for 1st column compare to the other so the series labels do not confuse the formula

----------


## Wickan

It works perfectly, you are brilliant!

Thank you so much!

----------


## AliGW

If that takes care of your original question, please select _Thread Tools_ from the menu link above and mark this thread as SOLVED.

----------

