LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check data range and return false value if a cell is blank DavidS Excel Discussion (Misc queries) 2 June 1st 10 09:12 PM
How do I check several sheets for data in a particular cell? lee Excel Discussion (Misc queries) 0 October 25th 06 07:47 AM
How do i have a check display with any data entry in a cell jwomack Excel Discussion (Misc queries) 8 November 19th 05 12:27 AM
Check to see if cell data is within a range mwrfsu Excel Worksheet Functions 4 August 22nd 05 10:40 PM
Looking to check a cell on ws1 against data in ws2 that is 7 colu. Kenner Costen Excel Worksheet Functions 1 December 30th 04 01:33 AM


All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"