empty ranges

hi all,
what would be the vb code to chech a range to see if 
anything (data) was there. say range j12:x12.

thank you in advance
S1
0
anonymous (74723)
1/27/2005 8:21:31 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
696 Views

Similar Articles

[PageSpeed] 50

Maybe

    If Application.CountA(Range("J12:X12"))> 0 Then
        ...

-- 

HTH

RP
(remove nothere from the email address if mailing direct)


"S1" <anonymous@discussions.microsoft.com> wrote in message
news:18ec01c504ad$ca4c0480$a601280a@phx.gbl...
> hi all,
> what would be the vb code to chech a range to see if
> anything (data) was there. say range j12:x12.
>
> thank you in advance
> S1


0
bob.phillips1 (6510)
1/27/2005 8:53:44 PM
thank you Bob
S1
>-----Original Message-----
>Maybe
>
>    If Application.CountA(Range("J12:X12"))> 0 Then
>        ...
>
>-- 
>
>HTH
>
>RP
>(remove nothere from the email address if mailing direct)
>
>
>"S1" <anonymous@discussions.microsoft.com> wrote in 
message
>news:18ec01c504ad$ca4c0480$a601280a@phx.gbl...
>> hi all,
>> what would be the vb code to chech a range to see if
>> anything (data) was there. say range j12:x12.
>>
>> thank you in advance
>> S1
>
>
>.
>
0
anonymous (74723)
1/27/2005 8:57:28 PM
Reply:

Similar Artilces:

Empty the Inbox
Is there a better way to empty all messages in the Inbox than holding down the Cntrl key? Just used the laptop after several months, and it downloaded all the old emails on the server. Using Windows Outlook Express. -- kbob This is not the Outlook Express newsgroup, but anyway: If you want to delete all the Inbox messages, highlight one header viewing in the Preview Pane, and Ctrl + A will highlight them all. Delete all in one motion. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "k. bob" <kbob@discussions.microsoft.com> wrot...

Looping until empty column
Here is my dilemma. I can do VBA in Access, but for some reason I jus don't get it in excel. What I want to do is go down a column and stor that info in a variable. I want this to happen untill there is no mor data. Once I have that data I want to go to another page and store th data in an empty column. I want the program to auto. find the empt column. Thank You in advance. thegu -- thegu ----------------------------------------------------------------------- theguz's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2491 View this thread: http://www.excelforum....

pst file appears empty
Hello all! I have a 450 MB pst file, that appears empty in OL98. I have run scanpst several times, did not help. I changed the first byte of the file from 21 to 00 with a hex editor and ran scanpst, it did report errors, fixed them and still no help. I tried exmerge, which reported succesful import, but did not actually retrieve anything from the pst file. Mdbvu32 also shows that the stuff is in there. It seems that the problem is quite common, but does anyone have a solution, how to fix it. Please help! Harri ...

count all the columns in a range with certain conditions
I need to count all the columns in a range with these conditions: i they contain entries; and are the entries only 'n' values. 'y'= goal met 'n'=goal not met .........................................john......sues......mary.....jack improved attendance..............y............n.....................n increased time i class............y............y.....................n grade/cours completion.......................n........................ I want the formula to come back as =1 because only jack has thes goals, and he did not achieve these goals. In order to char...

Calculating Commisions based on a range of values
I am trying to calculate a commision that is based on a sales price. The example commision is a fixed fee for 1- 225000, 225001-275000, 275001-40000, .... For what ever reason I have been unable to figure out how to accomplish this. Ideally I can write a formula that checks the sales price and determines the appropriate commision. So Sales Price Comm $225,000 $2,000 $300,000 $2,500 $450,000 $4,000 Any advice and help is greatly appreciated!! Thanks to all you excel wizards for your help.... Dianna, Build a small table somthing like 1 1000 2250...

Dynamic date range
I have a pivot table based on customer name (vertially, rows) and product (across, columns). In each record is the date. How can I base my pivot tables selection on a dynamic date range. Specifically to display records only as far back as 6 months. Lets say "today less 182 days", if that makes it easier. Thanks, AL AL, What I prefer doing is putting a column of TRUE/FALSE formulas into the source range, like =A2>(DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY()))) Then use that column as a page or row field, choosing TRUE. HTH, Bernie MS Excel MVP "Crazy AL&q...

Empty Cell not empty
If I use the following formula: =IF(B25="","",B25+C25) in Column U all the way down to Row 20000 to create a new value... (Column B has a date and Column C has a Time) and then copy and paste Column U to Column T as values, I see empty cells in Column T once my data runs out (presently around Row 40. However....if I use the CountA function,it is telling me that I have data in Column T all the way down to Row 20000. Since this combined Date/Time is being used as X Axis data it is screwing up the graph because Excel thinks those cells are Jan 1, 1900 when in fact...

using range names between several spreadsheets
Excel 2002 SP3 Win XP HE SP1 how do i use a range name that is defined in 1 excel file with a formula i am writing in another excel file? i can't figure out how to just copy|paste the name, etc. tx! Here's something you could try to see the syntax: In the workbook that's getting the formula Type = in an empty cell The go to the workbook that has the name. If the name is local to a particular sheet, go to that sheet. Hit F3 to see the Paste Name dialog choose the name you want hit enter Look at how the formula was completed. stef wrote: > > Excel 2002 SP3 > Win ...

Can I use a value to set the range of a SUM (i.e. SUM cell B5 and.
My variable is "# of weeks" and if I set it to "6", I want the formula to sum the values from cell B5 down 6 entries. Or if I set it to "5", I want it to sum the values from B5 down 5 entries....etc... Assume the variable is in cell A1 =SUM($B$5:INDEX($B$5:$B$1000,A1)) it's better to use index instead of offset or indirect since it is not volatile -- Regards, Peo Sjoblom "Dynamic Sum Ranger" <Dynamic Sum Ranger@discussions.microsoft.com> wrote in message news:4C39E9D9-FE4B-45D8-967C-1299F273C6B0@microsoft.com... > My variable is...

Freezing a cell range
In my shared excel file, users will be adding information to the first free row at the bottom of a list. I want to be able to freeze the top 5-6 "header" rows so that when users add new rows at the bottom, the "header" stays at the top and won't get pushed out of sight. I don't believe this is the same as protecting the cell range. I can split the screen to keep it there, but was wondering if there is a more elegant way of doing this. tia, -- JMorrell Select cell A7. Choose Window/Freeze Panes. In article <A6696286-6E64-4976-9970-2ABDE5BEB043@microso...

countif with a segmented range
Is there an easy way to do a countif with the data in question in every second column? The function might look like =countif(A3,C3,E3,"RED") =SUMPRODUCT(--(A3:A8="red"),MOD(ROW(A3:A8),2)) Counts every other row and if it is "red" -- Wag more, bark less "Allan" wrote: > Is there an easy way to do a countif with the data in question in every > second column? > The function might look like =countif(A3,C3,E3,"RED") >The function might look like =countif(A3,C3,E3,"RED") If the range is only a "...

How to identify Chart Source data as range?
I have a 'normal' excel chart on a Chart sheet (Cht1) Source data is coming from 1 of 3 pivot tables all on the same worksheet (wks1) using vba code. Userform on chart sheet has 3 option buttons to pass a pivot table name to 'updateChart' code. All working OK When the user first opens the file I would like the appropriate option button to be set to True according to which pivot table the source data was coming from on the previous fileSave and now being displayed as the active chart. Would like to identify the chart source data rngCSD range in code and test wit...

outputting values to a range from one formula #2
:) Thank you for responding. It took me some time to find my own post t see if any one responded, and when I did I was glad to see your response. I agree that the real issue is in my description of the problem. So here are more details. I have a basic formula that computes say revenue (R) out o amount of investment (I) and I want to find out how the function "behaves". One way to do so, is to start with a certain minimal value for I, an decides on a certain step-increment (D), create the series I -> I+D for say 5 times and show next to this series the 50 values of R. I can...

Empty Excel file is too large
I have deleted all sheets, and contents from my excel file, but it's still 2Meg in size. When I zip it, it's only 90K Bytes. (A blank excel file is usually 90K Bytes) Why is my empty file so large? It was originally 5 Meg, and I deleted all sheets, formulas, and VB codes. Right now there is nothing (except one empty sheet), but the size is still 2M. Please respond. Sometimes what I find is that Excel counts unused rows as part of the file size. So what I do is highlight all the rows from the first unused one to the last one, i.e. ctrl+g to bring up the goto box, then Ax:a65536,...

Contacts dialogue box shows up empty
I have an issue with Outlook Pro installed on my main PC that is not recognizing contacts. They are all there, but when I try to send an email, and I select "to" the contacts dialogue box shows up empty. Thanks in advance, Jay Is the Contacts folder selected as an Address List? http://www.howto-outlook.com/faq/contactsinaddressbook.htm -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -FREE tool; QuickMail. Create new Outlook items anywhere from within Windows -Properly back-up and restore your Outlook data ----- "Jay" <nospam_doctorpep...

moving range of data listed up/down to across
Hi, I have a range of data entered in range A:1 thru A:26 I would like to move the data so it appears on one long line going across instead , say line 1 columns A - Z. I am using excel version 97. Thanks for your help. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ If you copy A1:A26 using paste special, check the box Transpose and this will copy the data across the sheet. Note you should copy this to B1 and then delete column A if this is no longer required Ho...

ignoring empty???
Hi all, one of my students presented me with the following: "I get a list from another application. There is a column that has either value "yes" or looks like empty. Now, when I want to jump to the next row that has value "yes" I use the shortcut key Ctrl+ArrowDown. However, sometimes when a cell looks like empty there may be a space, with the result that when I need to jump to the next "yes" cell I end up in a cell that has a space. (one that looks empty) So, I used the function Trim to get rid of all the superfluous spaces in an extra column. And al...

empty in box
How do I empty my in box without moving everything to delete first? I can't find a "select all" choice. Can anyone share how to do this? Thanks, Linda Highlight one message header. Ctrl+A will highlight them all. Shift | Delete will bypass Deleted Items. -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "Linda" <Linda@discussions.microsoft.com> wrote in message news:EC17754D-E900-4E78-8F3F-766F73CB3410@microsoft.com... > How do I empty my in box without moving everything to delete first? I > can't > f...

Calculations with empty fields
I have a report that is calculating total elapsed time between dates. I have the calculation working fine if all fields are filled in. However, out of necessity there will always be fields that are not filled in yet (because the orders have not yet arrived, shipped, etc.). I am (of course) getting the #error result for all of these cases. I would like for these fields to remain blank until the orders have arrived, shipped, etc. I am pretty sure that I need to use .hasdata, but can not quite get it to work. My expression for the calculated fields is below. =Workdays([Firs...

How to set a range of cells
Hi, I recorded a macro and changed it as follow: Range("B4").Select Selection.End(xlDown).Offset(0, 1).Select If I want to set a range from the last selected cell to B4, how should I go on with the above? Thank you. GL range(selection,selection.end(xldown).offset(0,1)).select G Lam <No_spam@anywhere.com> wrote in message news:Or9l2DJwEHA.1988@TK2MSFTNGP12.phx.gbl... > Hi, > I recorded a macro and changed it as follow: > > Range("B4").Select > Selection.End(xlDown).Offset(0, 1).Select > > If I want to set a range from the last selecte...

When printing a document on deskjet an empty page comes out
I try to print an Excel document on an HP Desjet 3820 printer, but both print prewiew and printout are blank. When checking the print area my data shows correctly. Clear print area, then reslect the area. D -- Donal ----------------------------------------------------------------------- Donald's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1517 View this thread: http://www.excelforum.com/showthread.php?threadid=26841 I'm sorry, it didn't work to clear the print area. I'm still grateful for more ideas! best/sanna Donald's suggestion usuall...

Conditional formatting-Date range
I am creating a spreadsheet which is a checklist for a shipping processs. At the top I key in customer name and date the shipping process starts- let say Feb/15/2010. I require a number of documents that prompt other portions of the process. Therefore I need an indicator if I do not receive these within 7 days of the start date ie: Column 1 Column 2 Date received Date verified If column 1 remains blank (no date entered) and is past the start date by 7 days I would like it to turn red. NEXT if there is a date entered in that cell I need an additional c...

Empty Emails
I get daily emails that are empty. Blank. From: Blank To: Blank Body: Blank Can someone tell my why? I just delete them. Thanks Sue Nope, I do too, but SpamBayes takes care of them for me. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the (insert latest virus name here) virus, all mail sent to my personal account will be deleted without reading. After furious head scratching, Sue asked: | I get daily emails that are empty. Blank. | From: Blank | To: Blank | Body: Blank | | Can someone tell my why? I just delete them. | Thanks | ...

Excel2K: Is it possible to use dynamic named ranges in custom data validation formula?
Hi The data validation formula below (NB! Semicolons in formulas aren't errors - they accord to my regional settings) works: =(IF($B4="";0;SUMPRODUCT(--($B$2:$B$65536=$B4);--($C$2:$C$65536=$C4);--($D$2 :$D$65536<$D4);--($E$2:$E$65536>$D4)))=0) When I replace range references in SUMPRODUCT components with dynamic named ranges SheduleDate=OFFSET(Shedule!$B$2;;;COUNTIF(Shedule!$A:$A;">0");1) SheduleRoom=OFFSET(Shedule!$C$2;;;COUNTIF(Shedule!$A:$A;">0");1) SheduleFrom=OFFSET(Shedule!$D$2;;;COUNTIF(Shedule!$A:$A;">0");1) SheduleTo=OFFSET(...

Divide a a range of dates into intervals starting with the current date or the latest date in the range of dates
Could someone please advise if the following is possible. I have a table of dates not all dates are represented. I would like to group these dates into regular intervals, perhaps using the GROUP BY statement. For example the table may hold 1 year of dates, there may be multiple dates for the one day and there may be in some cases no entry for a particular day. The interval must always start from the current date, the interval may be say 20 days. The idea is to divide the data into 20 intervals from the date the query is run and then count up the entries if the date falls into ...