How to skip cells with text strings.

What should I add to the code below to cause it to skip a cell tha
contains a text string in the cell above it?  I need it to only work o
numbers in the cell above it.

If ActiveCell.Offset(rowoffset:=-1) <> "" Then
ActiveCell = ActiveCell.Offset(rowoffset:=-1) + 1
Application.SendKeys ("{Enter}")
End If

Thanks so much.

mikebur

--
mikebur
-----------------------------------------------------------------------
mikeburg's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2458
View this thread: http://www.excelforum.com/showthread.php?threadid=39345

0
8/5/2005 8:46:28 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
402 Views

Similar Articles

[PageSpeed] 40

You can check the cell above by:

if isnumeric(activecell.offset(-1,0)) then
  'it's numeric.
else
  'it's not
end if

mikeburg wrote:
> 
> What should I add to the code below to cause it to skip a cell that
> contains a text string in the cell above it?  I need it to only work on
> numbers in the cell above it.
> 
> If ActiveCell.Offset(rowoffset:=-1) <> "" Then
> ActiveCell = ActiveCell.Offset(rowoffset:=-1) + 1
> Application.SendKeys ("{Enter}")
> End If
> 
> Thanks so much.
> 
> mikeburg
> 
> --
> mikeburg
> ------------------------------------------------------------------------
> mikeburg's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=24581
> View this thread: http://www.excelforum.com/showthread.php?threadid=393456

-- 

Dave Peterson
0
petersod (12005)
8/5/2005 11:52:44 PM
Reply:

Similar Artilces:

How do I set up a cell which should be suggested as file name to s
How do I set up a cell whitch should be suggested as the file name to save when "SAVE AS" is clicked? For example on a worksheet B2 is a date,(AUG-1-05) A1="SCHEDULE FOR "&YEAR(B2)&MONTH(B2)&DAY(B2) A1 will be "SCHEDULE FOR 200581" On the window that opens after clicking on "SAVE AS", how I can do, to bring "SCHEDULE FOR 200581" to the box of the suggested file name to save. Thanks. You need code Activeworkbook.SaveAs FileName = Range("A1").Value -- HTH RP (remove nothere from the email address if mailing direct) ...

Square cell values, repost to same cell
Column A in excel is populated by the following Column A _________ 1 2 3 4 5 6 7 I know that I can put in column B a value of 2-->copy-->highlight column A-->paste special--> then multiply column A values by 2. But how do I square the values in A and repost to that column, such that the end result is Column A _________ 1 4 9 16 25 etc... One way: Copy the cells in column A. Choose Edit/Paste Special, selecting the Values and Multiply radio buttons. Click OK. In article <1190214961.243378.258830@g4g2000hsf.googlegroups.com>, JeffreyT.Talbot@gmail.com wrote: > Co...

curving text #2
I'm making an oval sign for my business and the text must follow the curve of the oval. Can't seem to do it... Give Word Art a try. The "A" icon on the left side of the screen. -- Don - Publisher 2000 Vancouver, USA "Betty Boop" <Betty Boop@discussions.microsoft.com> wrote in message news:3DD80208-ABEF-45D5-B14A-B088E308CE88@microsoft.com... > I'm making an oval sign for my business and the text must follow the curve > of the oval. Can't seem to do it... I have the an example on my web site. Scroll way down http://msauer.mvps.org/wo...

Link Cells (Clone? Mirror?) Should be simple (I think)
Very New to Excel I want one cell to be a "clone" of another (my choice of word). That is to say I can change the content of either cell and the other will change. If I have "John" in cell A1 I want "John" in B1 but I want to be able to change either and have the other follow. Is this possible? I know I can type in B1 "=A1" but then I HAVE to modify A1 if I want them both to change rather than being able to modify either for them to change. That way I can have 5-6 worksheets that all show the same data but in a different way but I can use any on...

Extracting from 1 cell and placing extractions in multiple cells
I receive the following data in a (3) cells: SYS DESKTOP PIII 500 6.4 G 128M 40X 1.44(1 cell) DELL(1 cell) OPTIPLEX GX1(1 cell) Is there any code or command that would extract and put in multiple cells: Dell Optiplex GX1 (one cell) DESKTOP (1 cell) PIII500 (one cell) 128MB (one cell) 6.4 G (one cell) 40X (one cell) The RAM (128MB) can be anywhere from 32MB-512MB The HDD (6.4 G) can be from 1.2-20.4 G I receive in 100 computers from a company and it takes me an hour (at least) to type in this stuff manually. Your help would be appreciated. Thank you. Larry -- lkw441 ---------------...

Help w/ cell shading across entire column-when a criteria has been
I have a column that I would like to change color once an certain criteria has been met. Example: Column A Cells --A1:A23 has various dates 01/02/09-08/10/09. A:125 has date of 12/01/09. Once the date of 12/01/09 has been entered in any cell within the range of A1:A124 I want the entire column to change color. Select A1:A124, open the Conditional Formatting dialog and use this formula =COUNTIF($A$1:$A$124,$A$125) If you need more details on Conditional Formatting please tell us what version of Excel you have and/or visit http://www.contextures.com/xlCondFormat01.html ...

Use a Carriage Returns when typing data into a text cell
What is the code for entering a carriage return in a text cell.? I tried & char(10) &, but it didn't work. What I want is to type Far[the_char_return_code]Farley resultng in Far Farley ** Posted via: http://www.ozgrid.com Excel Templates, Training, Add-ins & Software! Free Support at http://www.ozgrid.com/forum/ ** Hi char(109 is correct. You have to format the cell with word wrap in addition ('Format - Cells - Alignment') -- Regards Frank Kabel Frankfurt, Germany "Far Farley" <FarFarley@TheProfessionalNetwork.com> schrieb im Newsbeitrag new...

Skip if empty
Everyone, I'm sure this is an easy fix, but it is just beyond me. Hopefully, one of you is going to make me feel stupid. I have an excel 2003 workbook that is a template for a merge document in Word. I need it to be able to handle 10 different sets of information starting in column B and ending in column J. I have all the information for the Word document in sheet1 of the workbook, and I'm going to merge from sheet2. I'm not always going to have all 10 of the columns filled with information. so I need to be able to skip code when I run out of records so that when I merge them...

Creating String Property through CRM SDK
I need to create a String Property using the following VB.Net code: Try ' Set up the CRM Service. Dim service As New crmserver.CrmService() service.Credentials = System.Net.CredentialCache.DefaultCredentials ' Create the String Property object. Dim sm As New crmserver.StringProperty ' Create the properties of the String Property object. sm.Name = "MyString01" sm.Value = "Custom Text 001" ' Create the string property in Microsoft CRM. ...

How Do I insert the Worksheet Name in Cell A1 ?
Hi, can anyone tell me how do I insert the Worksheet Name in Cell A1 ? Excel version 2000 Many thanks in advance for any help Rob -- robertguy 44 Married two kids ------------------------------------------------------------------------ robertguy's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=5963 View this thread: http://www.excelforum.com/showthread.php?threadid=481872 =RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$A$1))-FIND("]",CELL("filename",$A$1))) Insert this formula exactly. Just copy and paste thi...

Protecting cells for different users
I have a excel sheet that will be processed by different users. Is i possible to protect cells to be used only by one user? Thanks -- AndyOn ----------------------------------------------------------------------- AndyOne's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2021 View this thread: http://www.excelforum.com/showthread.php?threadid=38563 Why not just give that user the password to Unprotect? Tools>Protection>Allow users to edit rang -- juli ----------------------------------------------------------------------- julie's Profile: http://ww...

Counting occurences of strings in a coloumn
i have coloumns of text (one word), these words are repeated and i want to count the occurences of one word....im sure its possible but cant find out how to do it...hope some one can help Cheers Robert --- Message posted from http://www.ExcelForum.com/ Hi Robert If you want to count the occurence of one specific word within a range of columns/row use the following: =COUNTIF(A1:D100,"testword") this will count all occurences of 'testword' within A1:D100 HTH Frank > i have coloumns of text (one word), these words are repeated and i > want to count the occurences o...

Text formatted as All Capitals?
In MSWord, formatting can easily be set so that selected text is always in capitals by Format>Fonts>All Caps. Can text in Excel be similarly formatted? =UPPER(A1) -- HTH Bob Phillips "Joey" <ianjoehenry@hotmail.com> wrote in message news:d7k4lu$isd$1@news-02.connect.com.au... > In MSWord, formatting can easily be set so that selected text is always in > capitals by Format>Fonts>All Caps. > > Can text in Excel be similarly formatted? > > Use Upper function will be fine. However, if you want to apply to a large area of text and want to ch...

Text Box Font Bug
Hello We have created a text box or an object in which text is written. The formatting in this text box used to be fine on an older machine and still works as it should on all other machiens. However computer, with a new installation of Office 2003 SBE the formatting of the text in the box is going very wrong. When we type in the text box and click off it the text either goes very big or very small. So small that it is unreadable, if i was to suggest a font size i would say 0.1. MS Support line said i need to post here first to confirm if it is a bug or not. al_blinky [using] hotmail...

How to convert xls to plain ascii text.
How do you convert xls to plain ascii text without having to install anything on the computer? Use File - Save as. In the File type box, use comma separated variables (*.csv), text(*.txt), or "space-delimited" (*.prn) as needed. Examine the saved file with NotePad. If that doesn't do it for you, try the Text Write Program at www.smokeylake.com/excel. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- <dsaklad@zurich.csail.mit.edu> wrote in message news:1118188255.854865.247110@g43g2000cwa.googlegroups.com... ...

Calculations within a cell
In a previous life I recall being able to click on a cell and up pops a window in which I can do simple calculations, such as a list of items with associated values. The window would automatically add the values and put the result in as the cell value. I could later come back and 'diddle" the entries within the pop up window. Well, no longer can recall how I did this. HELP for an old guy. thanks -- old guy You can perform calculations within a cell. Some examples: =3+3 entered in a cell will display 6 =3*3 entered in a cell will display 9 =3^2 {3 squared} entered in a cel...

Message text is now blank???
I suddenly find that the text of messages no longer appears: the message window is completely blank. This includes messages that I have already read successfully. The source of the message shows <body></body> or some such markup. I reduced the security prior to this; I remember the window had three options, but I can't find the window again. Certainly not in Security. I installed the new Outlook Junk e-mail filter (KB892236) just prior to problem appearing, but this appears to be unrelated: new email appears, and only some is treated as junk. TIA ...

How can I make a user fill out a cell
I need to have a user fill out a certain cell. I want to make sure tha this cell is filled out before the user leaves this tab (or sheet) tried validation but can not figure it out. When a user enters th sheet the cell is blank. They need to fill in a start date. If ther is a start date filled in then I need them to put in an end date. I there is no end date I do not want them to be able to leave the sheet. Any suggestions? :confused -- eluehman ----------------------------------------------------------------------- eluehmann's Profile: http://www.excelforum.com/member.php?action=...

How to keep email reply in HTML and not change to Plain Text?
Each time I reply to an email, the text becomes extremely tiny and unreadable. I notice that it changes to Plain Text and out of HTML. Why? How do I correct this challenge? There might be a setting selected that converts all incoming mail to plain text format. For details, you'll have to ask in a forum devoted to your e-mail program. -- Stefan Blom Microsoft Word MVP "Cybergrammy" <Cybergrammy@discussions.microsoft.com> wrote in message news:6DDEAF75-4D25-4484-AC4D-3D466F91AE62@microsoft.com... > Each time I reply to an email, the text becom...

Go To Special
Why does "Go To - Special Cells - Last Cell" go to a bottom row that may have been previously populated. Example: A1:A10 contain a value B1:B9 contain a value A10 the contents are deleted "Go To - Special Cells - Last Cell" still goes to B10 Hi Excel goes to the last used row. You may reset this following the instructions on: http://www.contextures.com/xlfaqApp.html#Unused -- Regards Frank Kabel Frankfurt, Germany anonymous@discussions.microsoft.com wrote: > Why does "Go To - Special Cells - Last Cell" go to a > bottom row that may have been previo...

Picture behind cell contents
Is it possible in Excel XP to add a picture that'll appear behind the cell contents? If so, how do I do it? I tried just the regular Insert...Picture, but the picture always seems to appear above the cell contents, even if I use the Send To Back option. I also looked at inserting the file as a pattern in a cell (sorta like you'd do in PowerPoint), but Excel doesn't seem to allow you to do that that I could find. Am I just missing something, or is this just not possible in Excel? (Note, in case there's any confusion, I don't want a transparent portion to the imag...

How to see hidden text in a row
I am working in an excel spreadsheet which is set up like a check register. The main header row is on the 4th line and I can see it on the screen, but not when I preview or print. How do I get it to view and print? I tried "unhide" and that didn't work. I am working in excel 2007. Help! I have 20 pages to do and can't get the sucker to appear! Laura On Tue, 15 Dec 2009 19:17:01 -0800, BJ-Trenton wrote: > I am working in an excel spreadsheet which is set up like a check register. > The main header row is on the 4th line and I can see it on the sc...

dump a multiple sheet excel file to a single text file
Is there a way to dump a multiple sheet Excel file to a single text file ? My understanding of CSV files is one CSV file per sheet in the Excel file. Thanks, Lynn You could combine the 4 csv files using an old DOS command. Say you have 1.csv, 2.csv, ... 4.csv in a file called C:\myfiles Open a command prompt window Flying Windows key-r type: cmd is one way of doing this Traverse to that folder: type: c: and hit enter type: cd \myfiles and hit enter Then type: Copy 1.csv + 2.csv + 3.csv + 4.csv ALLFILES.csv and hit enter ========= Another option may be to copy all the data into a singl...

Excel: How do I protect cells containing formulas?
A very simple worksheet with A2 as my usable or "entry cell". Cells B2, C2 AND D2 are the cells which compute information from the number entered in cell A2. How do I protect cells B2 - D2 and leave cell A2 open for information entry? Thanks in advance for any assistance Milo Protection in Excel is a two-stage process. All cells are lock by default, so select the cells you want un-locked and go to Format>Cells...>Protection tab and un-check locked. Now go to Tools>Protection>Protect Sheet... and all cells will be locked barring those you un-locked -- HTH Ni...

merging 2 columns, multiple cells with text -- possible?
Can anyone tell me if it's possible to merge two (or more) columns, eac with multiple rows, each cell containing text? (Without using a formul for each and every row -- that is, doing it in one fell swoop.) Th issue I have is importing tables from Quark listing stats for upward of 150 companies. The "A" column will have a company name, the "B column its location. To place this on the web, and to conform t existing style, the company name and location need to be in the sam cell. Any suggestions? (I have Excel 2000 -- Message posted from http://www.ExcelForum.com Yes, you c...