Structuring IF Statement Residing In Unrelated Cell?
Apr 20, 2014
Here is what I am trying to accomplish - note that I need the formula to exist in an unrelated cell - in this example I use A6
Cell A1 is a drop down with "Proposed" and "Actual" as the choices.
Cell A2 allows user input ("Proposed") until the "Actual" value is known.
The "Actual" value is pulled from a different workbook (Workbook2).
The "Proposed" number can change many times before the "Actual" number is pulled in...this means that I cannot place the formula into A1 as it will be overwritten when the user puts in their "Proposed" number.
I would like to place the formula into an unrelated cell to continue to allow A1 to be user edited.
Formula would reside in A6 and the statement I am trying to execute would be something like:
If(A1="Actual", A2=Workbook2.xlsx]Actual!A2)
I have tried the formula in it's simplest structure to confirm it works before I reference workbook2 but it doesn't seem to work (formula resides in A6): =IF(A1="Actual",A2="hello"). I just get a "FALSE" result in A6. If I remove the = before IF excel does not recognize the statement as a formula.
View 1 Replies
ADVERTISEMENT
Nov 21, 2009
I am trying to create a macro that will copy a sheet, move it to the end and rename it it with the next date of the value of the date in a particular cell.
I can do the first part no problem, however I am stuck with naming the sheet with the date which is the next day from the date value in a cell.
i.e. If the date value in A1 of the copied and moved sheet is 11 Nov 2009 I need the next sheet to be called 12 Nov 2009 in that format (dd mmm yyyy)
This is the code that I have come up with so far, but it gets stuck at the bottom line
Sub Macro3()
Dim WS As Worksheet, WB As Workbook
Set WB = ActiveWorkbook
Set WS = WB.ActiveSheet
WS.Copy After:=Sheets(WB.Sheets.Count)
WS.Name = Format(WS.Range("A1" + 1).Value, "dd mmm yyyy")
End Sub
View 7 Replies
View Related
Dec 11, 2007
I have a local area network with a couple of hundred computers which share one internet connection. Each user has a CPE (customer premise equipment) with an assigned (by me) IP. This CPE connets to the users equipment via CAT5. My responsibility is to provide internet. Sometimes users call and say their comupter cannot access the internet. I need a quick way to see if the problem lies with my network or if the problem is with the customer's computer. It seems to me that if I could open my spreedsheet with all the network connections and user data and simply ping their IP I would see if the problem is with my equipment or the users.
Column A of my spreedsheet has the actual IP addresses: 192.168.1.1 thru 192.168.1.254 and 10.0.0.1 thru 10.0.0.254 but not all are currently being used. Each row has distinct user account information. I have created a shortcut, named it PING106.bat and listed the target as %windir%system32ping.exe 192.168.1.106 which I can click on and it runs. Next I inserted a hyperlink in A:107 and it does work (it brings up a DOS screen and pings 192.168.1.106 three times then closes the DOS screen)... But there must be a better way. I don't want to create hundreds of shortcuts and insert hyperlinks to specific cells one at a time. It would be nice if I could click on a cell which contains an IP and know if that particular IP is up and reachable on my LAN.
View 4 Replies
View Related
May 24, 2007
I am trying to do, is paste a word in front of text that is already residing in cell throughout an entire column, and then automate this process by creating a macro that will do the same thing for me throughout an entire column. To best explain this, it woudl be like if you have a column 100 rows/cells long, and every cell already contains data. I need to insert something in front of what lies within each cell.
View 9 Replies
View Related
Nov 25, 2009
I am trying to combine two worksheets into one worksheet. In the first worksheet I have countries in the first column. In the second column, I have the statistics for how many people belong to a certain religion. Then in the second worksheet, I have the countries in the first column and birthrate in the second column. How do I combine this information into one table in a third worksheet?
View 3 Replies
View Related
Mar 5, 2008
so i'm building an application that'll allow users to manipulate records in Excel with just a GUI, using Userforms, Modules and Class Modules. it's all working but i'm feeling like i skipped a little on structuring it properly.
for example (from my Java work in college), you'd call just one object from the main method, which would create a GUI object, and create/manipulate instances of the different Classes when buttons are pushed. basically you one object whose main created other objects, who ran procedures, etc. what i'm hoping for is to make it as modular and easy to maintain as possible. would anyone have a good resource for optimising a medium-sized application? (the tips Excel/VBA Golden Rules. These Should NOT Be Optional were very good, by the way.)
View 3 Replies
View Related
Aug 23, 2009
I have a two workbooks, one which is a daily schedule and the other is a yearly summary. The worksheet in the yearly summary uses a date in the first column and the daily sheets each have a date on them. I've isolated my data in the daily schedule and I've retrieved the date in its numerical equivilant. I have data that is 6 cells wide by "x" amount deep on any given day. Essentially, I schedule different things to be made and each row has that designation, process, dimensions, quantity, etc.
I want to test the contents of the first cell in the array, copy the pertinent data, switch to the proper worksheet, and paste it into the line where it goes. I believe I need to check a few cells to narrow down exactly which group of cells on which sheet they would be copied to.
I am not trained at all as far as programming goes, but I've been practicing for a few years now. What I am just going to start doing is testing the cells in the rows in the array of data and trying to divide it out that way. This just seems like the long way around.
View 2 Replies
View Related
Jun 9, 2014
the macro works fine until it executes the paste values. At that point, the macro jumps to the "CountThem" function which is located in another workbook. The data that I am copy/pasting is in no way connected to any cells that are using that function. Although, other values in the workbook are passed down from data that uses that function.
I am still in the dark ages using Excel 2000.
This is the code for my macro.
Code:
Sub Current_to_Raw()
'
' Current_to_Raw Macro
' Macro recorded 2/12/2014 by
'
'
Range("N14").Select
[code]....
View 2 Replies
View Related
Jun 26, 2007
It can be done using named ranges. Name the range of the source list and set the validation to List =name. Sheet location does not matter.
I can get it to work using Indirect - but this puts a limitation on the process that the source must be open. Mike, perhaps you could explain more fully how you are achieving this?
View 9 Replies
View Related
Aug 8, 2007
My goal is to take a list of times which are exported from a database into 1 cell and change the string in that cell to become a function that adds all the times....
View 9 Replies
View Related
Oct 1, 2008
I'm trying to set up an if statement that will recognize that if a cell is FHR it will do something...but if it's PHR it will do something else. I think I found the place where I keep getting an error but I'm not sure how to go about fixing the issue.
View 2 Replies
View Related
Apr 22, 2009
I am trying to have a cell in sheet "Summary" count the number of cells in column DX of sheet "Analyses" that are greater than 0, provided that the value in column A of "Analyses" corresponds with the value in B8 of sheet "Summary."
(In "Analyses," there are 106 subjects, each taking up 64 rows. So, columns 1-64 correspond to Subject 1, columns 65-128 correspond to subject 2, etc. In column DX, each subject has 64 values that are either 0 or greater than 0. In "Summary," each subject has one row that summarizes the 64 trials. I want a single cell in the "Summary," sheet to reflect the number of times each subject produces a value greater than 0 in column DX of "Analyses.") I tried using this formula, but it did not work correctly:
=COUNTIF(IF(Analyses!$A$1:$A$10000=Summary!B8,Analyses!$DX$1:$DX$10000,""),">0")
(Summary!B8 = 1, so I am trying to calculate the number of values in DX that are greater than 0 only for subject 1.) When I press enter, this yields a value of 384. This is impossible, given that subject 1 only has 64 possibilities of yielding a value greater than 0. Subject 1 has 2 values in column DX that are greater than 0. I tried making this an array formula by pressing Shift+Ctrl+Enter, and that just gives me a #VALUE! error.
View 5 Replies
View Related
Jul 28, 2009
I am currently using an Intersect statement in a worksheet module to perform two things:
1. Insert a time stamp into row 2 when row 1 has a price inserted
2.To clear that time stamp if the price is deleted at some later date.
My problem is with the time stamp value being deleted by the user.
If I try to clear the price (now that the time cell =empty) I get a Runtime error 91 - Object Variable or With block variable not set.
I would like to convert this code to a select case statement but I'm not sure how to do this in this situation. Would error coding be appropriate in this instance?
View 5 Replies
View Related
Jun 3, 2009
look at the attached. In the estimate tab look at the box highlighted in yellow. Then look at the cells in pink (row 70). F70 is selecting the lowest maintenance value from the yellow box but I want C70 to display the hours associated to that value. The correct hours will need to appear according to what value is displayed. (this sounds confusing but look at the formula in F70 and you will hopefully see what im trying to achieve).
View 2 Replies
View Related
Oct 10, 2008
i'm trying to ask my spreadsheet to fill a cell with either 'YES' or 'NO' depending on the value of one cell. I've succeeded in getting it to enter 'YES' but can't figure out how to tell it to choose between the two options. This is the formula so far
=IF(L5>2,"YES")
View 3 Replies
View Related
Nov 17, 2006
i need to do a if statement to take 10% off the value in cell b2 if a2 =yes or if a2 =no then no discount will be applied.
the yes and no in a2 is a v lookup from another worksheet.
View 13 Replies
View Related
Sep 25, 2009
This is the current
Sub IfExample()
If Range("C1").Value = "Yellow"
Range("D1").Value = "COLOR"
End If
End Sub
I get a compile error on the "If" line.
Once I get it working how would I say this correctly?
If Range("C1").Value = "Yellow" or "Red" or "Purple"
The final "hope" is that it will continue down column C and D looking for the condition until first empty row is found at which point the code will stop looking for the condition.
View 9 Replies
View Related
Sep 21, 2006
I need an if statement which returns a value if cell B2 contains the value “Liability” The whole value of B is Liability with a 10 digit number (which is changing). I tried:
=IF(B2="Liability","Liability","")
=IF(B2="Liability*","Liability","") and
=IF(B2=CONCATENATE("Liability"," *"),"Liability","")
But nothing is working. Can’t get my head around to get it up and running and couldn’t find previous threads.
View 3 Replies
View Related
Feb 4, 2014
I am trying to use the if statement, if a cell = a cell that has a word in it then show content of another cell that has a name in it.
View 5 Replies
View Related
Aug 8, 2014
Attached is a small sample which displays what I am trying to achieve - I am trying to create an if statement for cell J2 which says:
IF F2 = 1 then "R", IF F2 = 0 but there is a 1 in either H2, I2, J2 then "W" and IF F2:I2 are all 0's "N"
I Have manually typed the desired output in col J
I Have manually typed the desired output in col J
Attached File : IFFF.xlsx‎
View 6 Replies
View Related
Jun 30, 2009
i have the condition below.
1<=x<2 = a
2<=x<3 = b
3<=x<4 = c
4<=x<5 = d
>5 = e
how to put the if statement function in the cell? or any better function to use?
View 2 Replies
View Related
Jul 23, 2009
I am trying to do a calculation based on the conditions of two cells but one cell I would need the range of the report. Either way, here is my current statement.
=IF(P2:P15 = "Green Building 15",SUM(COUNTIF(C2:C15,"Over AC")+COUNTIF(C2:C15,"Top Lab AC")),0)
I get a Value# error (though it systematicaly works if you check in the funtion area), and its because of the range I am using, is there anyway to bypass thiss issue or can someone give a better calculation.
View 4 Replies
View Related
Jan 30, 2014
I need a simple IF statement that look up in Column C for any text, and then add the value from Combobox "txtfloors" to Column B .
View 1 Replies
View Related
Dec 3, 2008
I'm looking for an if/then statement that will check if there is any kind of value in cell b before doing a calculation to cell J
View 7 Replies
View Related
Jan 12, 2009
i want to make and if statement in a cell that does the following:
if "J8 > 10" then fail
if "5
View 9 Replies
View Related
Jul 6, 2006
I have a cell that containes a concatenate statement for two named formula. The value taht the cell returns is a multiple of 10 (i. e10, 100, 1000, 10000 etc etc.) then in the adjacent cell, i have a nested if statement giviing differing text dependent upon the other cells value, i.e if less than 1000, return text string of "good" , however the formula does not seem to accept the value given in the concatenate cell.
View 9 Replies
View Related
Jan 15, 2007
When I tried using if & or statements I got an error - so I tried this:
=IF(K7="&","V,",""),IF(K7="1 Space + &"," V,","")
I want to return 'V,' if cell='&' or if cell='(space)&' I want to return '(space)V,' What is wrong with this statement..?
View 5 Replies
View Related
Nov 18, 2008
I have an area of a spreadsheet that I want to "disappear" when a particular option button is selected. I can make the text go away, but part of that area has cells that are formatted differently than the surrounding cells. I would like to change the cell background color, text color, and border setting. How would the syntax read?
View 5 Replies
View Related
Mar 28, 2009
If I have any value in cell A1 then the cell should show 1 if true or nothing if false. I have managed this via
View 3 Replies
View Related
Jun 7, 2009
I have two sub-system tabs (IAS & CCTV) and one calculations page (estimate). I need G3 (estimate) to give me the total price of hours sold on a project.
Because the systems hours can be marked up differently I wrote an average formula. But I need to add an IF statement saying if there is no hours in the sub system then ignore the hour price.
if this formula doesnt take this into account and I delete H3 (CCTV tab) then the overall price of hours sold in estimate will be wrong.
I have attached the sheet.
View 10 Replies
View Related