J
Jeff Armstrong
I am needing to set up a test condition to test if the
activecell is a string or number. If it's a number I want
it to sum up the cells. If it's a string I want it to
copy and paste. I believe I have the correct code for the
sum and copy/paste. I just don't know what the code is
for the If test.
If activecell = <code to see if cell is some number> then
activecell.offset(rowoffset:=1,columnoffset:=0).select
activecell.application.worksheetfunction.sum(myRange)
else
activecell.copy
activecell.offset(rowoffset:=1,columnoffset:=0).select
activecell.pastespecial xlpastevalues
end if
I left out the code that sets myRange using the Range()
function. I just need to know what I can place in the
first line of code to make this work.
Jeff
activecell is a string or number. If it's a number I want
it to sum up the cells. If it's a string I want it to
copy and paste. I believe I have the correct code for the
sum and copy/paste. I just don't know what the code is
for the If test.
If activecell = <code to see if cell is some number> then
activecell.offset(rowoffset:=1,columnoffset:=0).select
activecell.application.worksheetfunction.sum(myRange)
else
activecell.copy
activecell.offset(rowoffset:=1,columnoffset:=0).select
activecell.pastespecial xlpastevalues
end if
I left out the code that sets myRange using the Range()
function. I just need to know what I can place in the
first line of code to make this work.
Jeff