ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Very Simple Macro (https://www.excelbanter.com/excel-discussion-misc-queries/212579-very-simple-macro.html)

Robert_NSBG

Very Simple Macro
 
This is probably very simple But Im going nutz trying to figure it out. I
have a macro that takes me to a specific cell based on a set of criteria. I
just need to add 1 (+1) to the cell that is selected. So.... based on the
criteria cell x1 is selected, I need to add 1 to the value currently in x1.
It my be x2,x3 and so on, the macro just needs to add 1 to whatever active
cell Im at??????

Mike H

Very Simple Macro
 
Hi,

If isnumeric(activecell) then

activecell.value=activecell.value+1

end if


"Robert_NSBG" wrote:

This is probably very simple But Im going nutz trying to figure it out. I
have a macro that takes me to a specific cell based on a set of criteria. I
just need to add 1 (+1) to the cell that is selected. So.... based on the
criteria cell x1 is selected, I need to add 1 to the value currently in x1.
It my be x2,x3 and so on, the macro just needs to add 1 to whatever active
cell Im at??????


Don Guillett

Very Simple Macro
 
Post YOUR code for comments.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Robert_NSBG" wrote in message
...
This is probably very simple But Im going nutz trying to figure it out. I
have a macro that takes me to a specific cell based on a set of criteria.
I
just need to add 1 (+1) to the cell that is selected. So.... based on the
criteria cell x1 is selected, I need to add 1 to the value currently in
x1.
It my be x2,x3 and so on, the macro just needs to add 1 to whatever active
cell Im at??????




All times are GMT +1. The time now is 12:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com