I have a spreadsheet where Iam trying to add the serial numbers in each row using the below formula
=IF(C149<>"";MAX($B$149:OFFSET(B150;-1;0))+0.1;"")
However, whenever I delete the rows in B column there will be error value in all other rows like #N/A
Whether it is possible to delete the rows without affecting the Formula ?
I heard there is a excel function "INDEX" to be used, please reply with your answers how to apply INDEX function to the above Formula
Not exactly the answer you were asking for, but google picks this out for deleting without breaking formaulas - so anyone landing here from google...
The formulas break because you are removing cells from the spreadsheet - chainging the structure of the sheet. Where as what you want to do is just remove the data, and have all the remaining data move up.
One way is to select all the data below the line you want cleared (plus one blank line at the end) - then copy that range (to the clipboard) and paste it all back in one row higher.
Not a great solution - but it works - I found this question looking for a better way! :)
The issue could be related to $B$149 When you delete a row the $ means that the 149 cannot change accordingly like the C149 and B150 would , this may then mean that it is pointing to incorrect data after the deletion.
Related
So honestly I feel really dumb here. I have a very large file that has a lot of blank values where there should have populated a name, and I wanted to use a formula to fill those in. The data that I have is what appears in Columns A and B: A bunch of customer names and corresponding transaction codes (that repeat several times over), but blank spaces in a lot of places where the customer name should be. My attempt to fix this was to try filtering the data to get rid of the blank spaces, and use a VLOOKUP formula off that new table. Any ideas on what I'm doing wrong here? I don't care if it's a VLOOKUP, I just know there's an easier way to fix this that I'm not seeing, but none of the posts I've found fixed my issue...Thanks for any help you can give. Snapshot of Excel Table
Vlookup only performs matching left-to-right: the matching column has to be the first column of the range(D2:D13).
If you have Excel 365, you can use Xlookup:
=XLOOKUP(B7,E$2:E$13,D$2:D$13,,0)
or if not, you can use Index/Match:
=INDEX(D$2:D$13,MATCH(B8,E$2:E$13,0))
It might be more convenient to test for blank cells in column A and fill them in using a separate column if so, eg in C2:
=IF(A2="",XLOOKUP(B2,E$2:E$13,D$2:D$13,,0),A2)
I am making a payroll program in Excel and one of my concerns is that the salaries of the employees are searched using the INDEX and MATCH or VLOOKUP function. The problem is if the salaries get updated in the future (e.g. a raise or changes in rates), all the previous entries that used the old salaries will be updated to the new salaries. This is a disaster and would make my entire program useless and inefficient. Therefore I need to automatically lock previous calculated cells after a certain time.
Edit: Note we do not want to do this manually such as copy pasting values only because almost all cells are connected to each other and one mistake by the encoder or if they forget to do this before updating a value, everything will be messed up.
No! Not copying and pasting, there's a simpler way. You want to convert the Formula property of a given cell (what's shown in the formula bar in Excel) into the Value property of the cell (what's shown in the cell on the spreadsheet). For a given range A1:B6 this would done by the statement
Range("A1:B6").formula = Range("A1:B6").value
But there's a quirk in Excel that you can run faster by accessing a Value2 property, so
Range("A1:B6").formula = Range("A1:B6").value2
The rest of the code is left as an exercise for the reader :-)
I have two excel sheets in a document used to make charts from number estimates. One sheet is a database query via plugin that imports data into excel. When pulling the data from my database, you can see the plugin correctly does not populate blanks with a 0 in columns C and D.
RallyQuery
The 2nd sheet is used to perform calculations in order to make the charts. If you look closely, columns G and H should exactly match C and D from the previous picture, however, excel has added zeros in cells that were blank in the database. The formula used to pull the data from the first sheet is:
=IFERROR(AgileCentralQueryResultList[#PlanEstimate],"")
I need excel to stop replacing blanks with zeros without removing any true zeros that were correct in the database. All of the answers I've found also remove the true zeros, which will not work.
Totals
You need to adjust your formula a little bit, A blank cell apparently is not going to produce an error. so you may want to drop the iferror part of your formula and go with an if. If you have source cells that contain actual error results then you will need to do a second if.
Option 1
=IF(AgileCentralQueryResultList[#PlanEstimate]="","",AgileCentralQueryResultList[#PlanEstimate])
Option 2
=IF(OR(AgileCentralQueryResultList[#PlanEstimate]="",ISERROR(AgileCentralQueryResultList[#PlanEstimate])),"",AgileCentralQueryResultList[#PlanEstimate])
Option 3
=IFERROR(IF(AgileCentralQueryResultList[#PlanEstimate]="","",AgileCentralQueryResultList[#PlanEstimate]),"")
I would try option 1 first and see if you need to take that extra step for error checking using option 2.
Using all the great changes from "Forward Ed" I was able to add my IFERROR check back to his formula to get it all to be happy again. Thanks a ton Ed, credit goes to you for guiding me.
=IFERROR(IF(OR(AgileCentralQueryResultList[#PlanEstimate]="",ISERROR(AgileCentralQueryResultList[#PlanEstimate])),"",AgileCentralQueryResultList[#PlanEstimate]),"")
First time question and I hope it's easier than I'm making this.
Can I use a variable inside a COUNTIF formula?
Currently my formula is:
=COUNTIF($C$2:$C$415,R6)
I would like to have $415 as my variable. I have tried something along the lines of:
D1=415=COUNTIF($C$2:$C$(D1),R6) ..
but obviously get a error.
The reason I need this is column C will constantly be incrementing as I add more rows.
Instead of going into each of my formulas and updated 415 to 416, 417 etc, I would like to just define a Cell that can be my variable, or total rows.
Currently Column C can have blank cells, so I can't have a macro that finds the next empty cell.. but I do however have Column A with a constant populated cell and stops at the last ticket. However Column A is unrelated to the COUNTIF.
UPDATE 1
I'd also like to mention that I'd be using this variable in many formulas in the spreadsheet. Not only COUNTIF's. Also, the COUNTIF contains text.
UPDATE 2
Actually, I figured it out! I am using this formula instead:
=COUNTIF(INDIRECT("C"&D1&":A"&D2),R6)
I'm putting D1=2 and D2=415 and will just update cell D2 with how many rows I have.
I guess I just needed to ask the question thoroughly to fully understand what I wanted!
Thank you in advance for all help, tips and suggestions.
Would "=COUNTIF($C:$C,R6)" do the trick? This will apply COUNTIF to the whole of column C. It's an easy solution, but probably not the most efficient.
I prefer tables for storing data; as new data is added, the table automatically expands and the columns are already labeled (much like Named Ranges). Then you can have =COUNTIF(Table1[Column1],"Criteria"), which will encompass any new rows added to the table automatically. Especially helpful if you have multiple tables in the same column.
Afternoon all :)
This is kind of a little difficult to explain but ill happily clarify where ever it is needed. Thank you for taking the time to read this post ^^ Here goes..
I am currently creating a spreadsheet that is been extracted from the database whereby I am tasked to concatenate data from 2 adjacent cells. I change the database on a frequent basis adding or removing data wherever necessary so the range of data is always different. To concatenate the two cells I use the following formula:
e.g: =IF(ISBLANK(B8&H8),"",B8&H8)
This formula works out great when im dealing with increasing amounts of data as I can simply drag the formula down as far as i want and i know that it will pick up the formula whenever I refresh the database without the need of seeing value errors when the formula ends up referring to a blank cell. The snag here (and my query as well) is if I have less data then before the formula within the last set of cells looks something like this:
e.g: =IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
I have dealt with #REF before in other spreadsheets whereby I simply used a ISERROR in the statement but I dont know if there is a possible way of including this within my formula. I need the ISBLANK there so I have more control and dont have to drag the formula as often.
If there is a better way around this or a way to amend the current formula Id appreciate the help :)
The only way you are going to get something like this:
=IF(ISBLANK(#REF!&#REF!),"",#REF!&#REF!)
in the formula bar is if you(or the system you are using) are somehow deleting the cells that were originally referenced. This should be avoidable. You can clear the cells referenced instead of deleting them completely - then you won't get this error - and your formulas will remain intact. Now you can certainly use the formulas provided in the comments to hide the errors - but the root of your problem seems to me to be that the errors are occuring in the first place. Good Luck.