Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Single Program to increase the values in any cell by one

  Asked By: Techguy    Date: Feb 25    Category: MS Office    Views: 871
  

Can I get a macro/program which increases the value of a cell by one
in the same existing format
The existing number 89 should become 90
The existing date 07-May-08 should become 08-May-08
The existing week Monday should become Tuesday
I copy the entire data of an existing filled row (in which cells
contains addresses; dates; figures; formulae; etc) into another row
to avoid retyping of most of the repetitive data and mannually change
the dates; numbers etc. wherever required
With the above program I should ease my work
By clicking the cell itself or an icon or menu item the macro should
run and I get the result

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Patty Freeman     Answered On: Feb 25

Why not just use formulas in the second row. Adding one to a date  value
gives you next day. Assuming you've derived the Monday by either setting
the cell's display format appropriately or by using the Text function from
the date in another column, then it should be OK too.

It might also be possible to use the fill-down facility to do this. I don't
use it much, so am not sure about this.

 
Answer #2    Answered By: Johnathan Nelson     Answered On: Feb 25

you can try to do this with iterations.

This is a bit tricky but doable

No macros involved just excel option settings for calculations should be
set to iterations on, number  of iterations to 1 and manual calculation
set to on.

Step 1

Cell A2 = if(A1=A1,A1+1,)
Cell B2 = IF(B1=B1,B1+1,)
CEll C2 = B2; Here in the format of the cell  customise it to [$-409]dddd.
This will ensure that you get the day part for the corresponding date.

Step2

Cell A1 = 89 ; Starting number
Cell A2 = 1/1/2000; Starting date

Step 3

Press F9

Step 4

Cell A1 = A2
CEll B1 = B2

You are now good to go.

For the automation process you just keep pressing F9. and everything
increases by 1.

 
Didn't find what you were looking for? Find more on Single Program to increase the values in any cell by one Or get search suggestion and latest updates.




Tagged: