View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jeff Armstrong Jeff Armstrong is offline
external usenet poster
 
Posts: 20
Default How to check cell data

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).se lect
activecell.application.worksheetfunction.sum(myRan ge)
else
activecell.copy
activecell.offset(rowoffset:=1,columnoffset:=0).se lect
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