how do i create a macro that would check the contents of cells

Hi, I am stcuk on Excel VB. I am trying to create a macro that when run would 
check to see if there is an 'X' in 6 specific cells on a row(the cells are 
next to each other), there is an X in all of them it would then display a msg 
saying 'not possible', else it would not doing anything. I hope i did pass 
the problem across in a sensible manner. Thanks for helping.
0
Jade (9)
12/31/2005 12:12:01 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
346 Views

Similar Articles

[PageSpeed] 44

I'd just use another cell next to those 6 cells:

=if(countif(a1:f1,"x")=6,"Not Possible","")

Format it in a nice big red font.

Jade wrote:
> 
> Hi, I am stcuk on Excel VB. I am trying to create a macro that when run would
> check to see if there is an 'X' in 6 specific cells on a row(the cells are
> next to each other), there is an X in all of them it would then display a msg
> saying 'not possible', else it would not doing anything. I hope i did pass
> the problem across in a sensible manner. Thanks for helping.

-- 

Dave Peterson
0
petersod (12005)
12/31/2005 1:37:38 AM
Reply:

Similar Artilces:

Require a macro for Excel 2007
I need a macro that will check out a given range( say a1 to z100) As it checkd ther range(a1..z100) if there is NOT data in the cell, replace the blank cell with $0.00 I appreciate all the help I am getting from this site Hi Try this: Sub FillRange() Dim TargetRange As Range Set TargetRange = Range("A1:Z100") For Each c In TargetRange If c.Value = "" Then c.Value = Format("0", "$0.00") Next End Sub Regards, Per "pcor" <pcor@discussions.microsoft.com> skrev i meddelelsen news:00923994-0FE7-4285-8DD3-5832584836C8@microsoft.com.....

Close Print Checks window when Post Checks window is active (UPR)
With version 10.0 in Payroll, the Print Checks window stays active when the Post Checks window is open. Users can mistakingly print checks again when the only option to reprint, void, etc. should be from the Post Checks window. There is no reason for it to remain active. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and t...

Check Register #3
I can not seem to find out where to get information on how to print my check register without printing a report in MS Money 2002. Can anyone help me? you... "Renee" <reneenstan@prodigy.net> wrote in message news:02f901c36529$8d7dc400$a601280a@phx.gbl... > I can not seem to find out where to get information on > how to print my check register without printing a report > in MS Money 2002. Can anyone help me? ...

Extract multiple numbers from a cell
Here are some examples of text with multiple numbers embedded: A1 = 3031 // 2841;1886-ring road location A2 = 3305 //1455-historical A3 = //3491;3492 A4 = //inactive location; historical = 1790; enter new locaion Result should be: B1 = 3031;2841;1886 B2 = 3305;1455 B3 = 3491;3492 B4 = 1790 Try this UDF (User Defined function). From workbook launch VBE using Alt+F11. From menu Insert a Module and paste the below function.Close and get back to workbook and try the below formula. =ExtractNumbers(A1) Function ExtractNumbers(strData As String) As String Dim intTemp As Intege...

How do i compare numbers in cells with formula
I have a report I am attempting to automate as much as possible. What I have done is put in the following: Cell J is a current % Cell K is my product type (a number 19,20) Cell L is =if(k2=19,"65%",if(k2=20,"75%")) Cell M I want it to tell me whether the % in cell J is more then L, when I input the formula =if(j2>=L2,"Yes","No") it does not change but if I delete the formula in L and type a % in it works....HELP Ditch the double quotees around the percentages =if(k2=19,65%,if(k2=20,75%)) "nolechik" wrote: > I have a report I am a...

merging cells excel 2003
Hello, I have a spreadsheet which has 3 headings each 3 columns wide. bcd - efg - ghi Now on the 2nd row each on of the 3 columns has been merged so you can write in the title, "Available for Monday" "Available Later" "Never Available". So far so good. But the columns below (about 100 of them) are not merged. |----------------|-----------------|----------------| |---|-----|------|----|-----|------|---|-----|------| |---|-----|------|----|-----|------|---|-----|------| |---|-----|------|----|-----|------|---|-----|------| .... .... |---|-----|------|----|-----|---...

password protecting with default unlocked cells only
Is there a way to insure that when password protecting a sheet i defaults to selecting unlocked cells only. I'm using a marco on protected sheet and sometimes it protects with selecting both locke and unlocked cells. ActiveSheet.Unprotect ("password") Other Macro ActiveSheet.Protect ("password") Thanks for any help with thi -- Db171 ----------------------------------------------------------------------- Db1712's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1591 View this thread: http://www.excelforum.com/showthread.php?threadid=3199...

Checked boxes won't clear out when I add a new form
I created a simple Access database for entering names and addresses etc. for a rock climbing club and created checkboxes for 4 types of rock climbing activities (Lead Climbing, Belaying, etc.) that must be checked if applicable as part of a liability/assumption legal requirement. The problem is that if I check one or two of the boxes, then create a new record, the checked boxes on the previous record also become part of the new record. What are the properties that I should set so that a new record is blank? PS - I'm not a technical person - and it's a very simple database so a ...

change cell change picture
Hi I'm using cell to display picture, for that, i saw a topic here with this example: http://www.mcgimpsey.com/excel/lookuppics.html but the problem is that i'm not getting the pictures displayed, it appears like example only without picture. I'm making the connection between picture and cells with INSERT -> NAME -> DEFINE. someone can tell me how can i do to work it out? thanks ...

Error creating new company GP9
I try and create a new company, it gets through most of the steps and then near the end gets a dexterity runtime error, I'm on the install server I can see the SQL file folder in the GP directory, and I am logged in as the administrator. Not sure what else to do here? Anyone had a smililar problem? ...

Seperate text and number to different cells
Hi, I have some data in cell (A1) which is alpha numeric, from this data I want number and text in seperate cells (B1) and (C1) respectively per the below example. A B C Raw Data Numbers Text asho344555k123 344555123 ashok 123ab47 12347 ab 1affu123 1123 affu Thanks Afroz The following User Defined Function will return the numerals in a mixed cell: Public Function ReturnNumerals(rng As Range) As String Dim sStr As String, i As Long, ...

Cell Formats #2
I know how to reference the value of a cell but is there a way o reference a cells format? Provide more details about what you wany to achieve, please. There are ways to ascertain the formatting of a cell but generally would require VBA Gord Dibben MS Excel MVP On Sat, 29 Dec 2007 13:21:02 -0600, "Jeff Klein" <jklein@nospam> wrote: >I know how to reference the value of a cell but is there a way o reference a >cells format? > On Sat, 29 Dec 2007 13:21:02 -0600, "Jeff Klein" <jklein@nospam> wrote: >I know how to reference the value of a...

referencing cell contents, after deleting and shifting new contents into cell
Greetings all, on Sheet 2 of my workbook I reference some cells from Sheet 1. ie. "=Sheet1!D3" I have Sheet1 setup as a schedule. Since sheet1 is a schedule, its columns are days of the week.. and I constantly add days to the end of it (Columns F,G,H,I..etc..etc). When today is over, I delete columns A and B, and columns C and D shift over and become the new A and B. However on sheet 2, the reference is lost even though new values are shifted over into Columns A & B. Is there a way for the Sheet2 to keep the referencing A and B from sheet1 once the columns in Sheet1 are ...

Populating consecutive columns from a static set of cells?
I am trying to populate a master quote list and want each entry (1 row) populated by the info I enter from my quote estimate template in a separate workbook. I know how to link cells, but don't know what formula to use in the template to make each entry choose the next open row on the master list. Anybody up to the challenge? -- -Thomas Hi Thomas- If I understand your question, the first issue to clear up is that one workbook cannot 'send' data to another, i.e., your template can't send new entries to what you are calling the Master. What you need to do is work from ...

Macro query + excel 2003
I need a button so that when pressed it exports the data from the cell range A21:S81 on this sheet it also exports the info from the same range A21:S81 on sheet 2 to an external excel workbook. Thanks Hi Neil Try the below macro.. --Edit the extternal workbook name and path --Edit the destination sheet name... --Edit the copy desitnation. Currently that is mentioned as cell A1 Sub Macro() Dim wb1 As Workbook, wb2 As Workbook Application.DisplayAlerts = False Application.ScreenUpdating = False Set wb1 = ActiveWorkbook Set wb2 = Workbooks.Open("c:\1.xls"...

Active Cell Color
The active cell has a black outline. Some of my users are having trouble seeing it. Is it possible to change the outline color of the active cell? "ClaireView" <froufle@notthishotmail.com> wrote in message news:6912B173-6871-440F-979F-90E4EF32A488@microsoft.com... > The active cell has a black outline. Some of my users are having trouble > seeing it. Is it possible to change the outline color of the active cell? Check this out. http://www.cpearson.com/excel/RowLiner.htm You may find it useful. A similar technique I use is Private Sub Worksheet_SelectionChange...

Date-orientated update of cells in different spreadsheets
Dear Excel experts! Hope I am right here... I would like to create a customer-orientated & task daily checklist. Basically, I want to have a single spreadsheet (spreadsheet1) and worksheet (worksheet1) with customer names along the left (1 per row) and tasks along the top (1 per column) which I update on a daily basis. Once the task has been performed for a customer, a value will be written in the appropriate field i.e. for customer1, the task1 result "passed" would be typed into B2, however, for customer2, task1 might have "failed" which would be typed into C...

REPLY TO: how can i creat options in a cell of excel worksheet
You really need to give more information on what you're looking for. What do you mean by "Options"? Also, if you don't leave a message in the message portion when you're posting, many of us can't reply to the request. HTH, Barb Reinhardt ...

automatically replace cell in formula
Excel 2002 SP3 Win XP HE SP1 Hi, I have a simple formula =AVERAGE(B2:B37) The reference to Row 37 appears in many formulas throughout the spreadsheet; depending on how much data I have in terms of periods; 1 year or 3 years or 10 years, etc. Since each data point (that corresponds to a month or quarter, etc.) is in its own row, the more periods (the longer time) I am looking at, the more rows, etc. Since cell Row 37 (or whatever other row) is a vital reference point for many other formulas in my spreadsheet, how can I quickly change it to reflect this addition in rows? What I reall...

transfer images from cell to computer
Trying to download images(pictures) from nexteli680. I let vista set it up for me.The drivers see the phone on the usb port and it shoow up on drive D: when i click it it tell me to insert the disk, I already have a disk drive on F: I downloaded vista drivers manually same thing i also downloaded motorola's drivers. All will recognize the phone but will not open the folder. a little icon shows up on thr task bar so i know its on here somewhere. I have connected the phone to the phone memory card which it says will work in their user manual. I can't simple to find a more det...

Partial editing of cell contents.
I am developing a spreadsheet to be distributed to numerous individuals for updating and returned to me to be compiled. I have a column for account number which consists of a 6-segment number, each segment separated by hyphens. I need recipients to edit the middle two segments and return to me. I want to create another column that duplicates the account number string except for the middle two segments, and either highlight the segments to be edited or mask the two segments to ensure correct number of digits are entered for the segments. How can I accomplish this? -- Twinspar ...

Resize check box and have "x" instead of a check
Is it possible to resize the size of the check box? I know I can resize the text portion of a check box, but I would like to make the box larger. I would also like to change the check mark to an 'X', is that possible? Thanks Tim Tim, It is not possible to change the size or use a 'X'. There is a way to simulate. Use 2 Label. 1: Borderstyle: 1 Name: Chk1 Caption: "X" Font: The size you like Size: to fit the "X" Location: Where you like it to be 2: Borderstyle: 0 Name: Lbl1 Caption: Your text Font: The size you like Size: minimaal...

check substring of a string in Excel VBA
Hi, How do I check the subtring of a string ? I don't think I can use Strcomp. Let say I have string "Hello world" The Substring that I want to find is "orl" What function can I use? Regards, Magix Checkout the InStr() function in Help. -- Gary's Student "magix" wrote: > Hi, > > How do I check the subtring of a string ? I don't think I can use Strcomp. > > Let say I have string "Hello world" > > The Substring that I want to find is "orl" > > What function can I use? > > Regards, >...

Form with cells and TextBoxes...how to TAB to textboxes?
I have a simple sheet that's being used as a questionnaire form. The sheet is Protected, only allowing users to select unlocked cells. Users tab from cell to cell and either type in or select an item from a list (Data/Validation). I also put in some textboxes but I can't tab into them. Is there a way to get the tabbing to work? Thanks, Toby Erkson Oregon, USA WindowsXP, Excel 2003 AFAIK, you cannot tab to a textbox. Tabbing only works between cells. Why would you want to tab to a textbox anyway? "Toby Erkson" <not@necessary.com> wrote in message news:us#QMv9qE...

Macro to update Chart #2
I'm trying to create a macro that will update a dashboard of charts by pushing a button. The data resides in the same excel file but different page and the dashboard contains approx 7 charts. The charts are updated quarterly and rather than having to go into each one and shift the source data I would like to automate it....any ideas? I'm a novice to macros! -- lajohn63 Why use a macro? Make dynamic charts: Dynamic Charts - http://peltiertech.com/WordPress/dynamic-charts/ Dynamic and Interactive Charts (overview) - http://peltiertech.com/Excel/Charts/Dynamics.html - Jon ...