I am using this formula to search a range of cells for the letters "cc".
=COUNTIF(G4:G28,"cc")*G3
This lets us know who paid with a credit card. I was told that we also need to know the date. So now I am adding the date to the cell using this format "cc (10/03)" Of course now the formula does not count this cell because the formula is looking for "cc" only. So now I need to replace the "cc" part of the formula with something that looks in the cell for "cc". I think I can use ISNUMBER but that requires that I enter a specific cell in the formula. Since this formula is being used as part of a formula that contains a range, how would I do this?
Hope this makes sense.
Many thanks,
Houston
If you need to have the date in the same cell then you can use a "wildcard" * in COUNTIF like this
=COUNTIF(G4:G28,"cc*")*G3
then that will count all cells that start with "cc"....or a wildcard either side if you need, i.e.
=COUNTIF(G4:G28,"*cc*")*G3
which would count cells that contain "cc" anywhere.
Ideally you would put the date in a separate cell in the same row so that your original formula would still function OK
Related
In Cell F190 I have the following formula: ='[Account 19617768.xlsx]19617768'!$G$1142 (the cell displays the value in 19617768 $G$1142 - (£1609.50)
I can display this formula in Cell J190 with the formula: =FORMULATEXT(F190)
By manipulating FORMULATEXT(F190) (i.e. Using Left(FORMULATEXT(F190),38)&(Right(FORMULATEXT(F190),4)+2), I end up with Cell J190 displaying formula: ='[Account19617768.xlsx]19617768'!$G$1144.
What I need is for Cell J190 NOT to display the formula, but the actual value in Account19617768.xlsx G1144 (£1859.50), and it's the conversion of the formula into the value I don't seem to be able to find an appropriate function
I don't have a problem if I need to use an additional function in another cell to finish off the conversion?
I know this should be easy, but having just been released from hospital, I seem to be having
trouble working the simplest things out
'$' signs in excel formula keep the preceding data static.
In other words. Remove the $ in G$1065.
Now when you drag the formula down the column the Cell number will increase.
If you keep the $ in front of G the column G will never change no matter where the formula is copied.
This phrase is embedded in many formulas on my sheet:
OFFSET(Table1[ReportDate],0,$B$1)
It returns a reference to a column in Table1.
To make those many formulas shorter, I'd like to extract this OFFSET formula to a separate cell for the others to refer to.
The OFFSET returns a reference. Putting OFFSET(…) in a cell just returns #VALUE, and so does INDIRECT(OFFSET(…)).
EDIT: The "many formulas" are SUMIFS, and the OFFSET chooses the column to be summed:
=SUMIFS(OFFSET(Table1[ReportDate],0,$B$1),Table1[ColumnB],$H10,Table1[Report Date],"<="&rYesterday)
If I understand you correctly, you want to replace the original OFFSET formula with something simpler to be used in other formulas.
You can do so by giving a name to this OFFSET formula.
In the above mock-up example, I have given a name SUM_Rng for the OFFSET formula and used it in my second formula, which is the same as your original SUMIFS formula.
You can press Ctrl+F3 to bring out the Name Manager in Excel and add or modify names which can represent a reference of a cell or a range either hard-coded or returned by a formula. I noticed that you already used a name rYesterday in your SUMIFS formula so there should be no problem for you to add this formula to the name manager.
Cheers :)
I am straggling with some formula that I have a spreadsheet that contains two range of cells. What I want to do is,
I would like to create a search Box that will search a value from Range A and if found return range B value and also will count of range B value is repeated.
Below image is for what I mean
I used INDEX, MATCH and also IF Functions :( but not really get what I wanted.
I am poor in formula, so it would be great if someone can figure out what kind of functions I should use for this.
For information, it can be achieved through formula as below.
E3 houses the value being searched for e.g. "A"
In cell F3 insert following array formula which needs to be committed by hitting CTRL+SHIFT+ENTER simultaneously.
=IFERROR(INDEX($B$1:$B$1000,SMALL(IF(IFERROR(MATCH($E$3&$B$1:$B$1000,$A$1:$A$1000&$B$1:$B$1000,0),0)=ROW($B$1:$B$1000),ROW($B$1:$B$1000)),ROWS($A$1:A1))),"")
Copy down as much as you need.
You need to adjust 1000 to suit your data. It should match last row.
In cell G3 you can use following formula.
=IF(F3="","",COUNTIFS(A:A,$E$3,B:B,F3))
Copy down as much as you need.
I need help with a formula.
I have a spreadsheet where the user enters an integer in one cell. i need to use that value to place a formula in another cell.
so, for example, user enters 24 in the cell. I need it to place a simple sum formula in the 24th cell of the row immediately to the left and highlight it red.
is there any way to do this?
You would put the SUM formula in an IF() function that is true when the row = the value in the cell:
=IF(ROW()=$E$2,$E$3-SUM($B$1:$B1),"")
OFFSET may be a great option here.
If I understand what you are saying, based on your comment to #ScottCraner's answer, you can use this formula in say P4 or wherever really.
=P3-SUM(OFFSET(P4,0,0,P3,1)
This will work if you do not need the formula to be exactly in the cell P28 or wherever it's defined, but just want to SUM the number of payments based on the trigger in P3.
I cannot figure out why this formula isn't working:
=IF(A2="160850",TP,IF(A2="202006",BL,IF(A2="203646",MM,IF(A2="203917",KT,IF(A2="200265",MP,IF(A2="201447",JB,IF(A2="170566",VB"")))))))
Cell A2, A3, and so on, represent commossion codes that are specific to a sales rep.
So, if Cell A2 equals 160850, then I need the cell I place this formula in (C2) to display TP, and so on, based on the formula above.
I have checked and this looks okay to me. However, when I enter this formula in, I get a message that states The formula you entered contains an error.
Can anyone assist?
Thanks so much in advance
You need to put your return values inside quotes, otherwise Excel assumes that TP is a valid name in the workbook (i.e., an address, named range, or variable).
=IF(A2="160850","TP",IF(A2="202006","BL",IF(A2="203646","MM",IF(A2="203917","KT",IF(A2="200265","MP",IF(A2="201447","JB",IF(A2="170566","VB")))))))
There may be additional errors, but this one is apparent.
Wouldn't it be simpler to use a lookup table? List all your commission codes in one column, e.g. Y2:Y10 then list the linked sales rep (initials) in the next column (Z2:Z10) and you can then use this formula copied down the column
=VLOOKUP(A2,Y$2:Z$10,2,0)
The last set of double quotes should be parentheses:
=IF(A2="160850",TP,IF(A2="202006",BL,IF(A2="203646",MM,IF(A2="203917",KT,IF(A2="200265",MP,IF(A2="201447",JB,IF(A2="170566",VB)))))))
You also probably want to take the agent numbers out of quotes or it'll return false because the number entered is numeric and you're looking for a string. The Codes should be in quotes, though e.g. IF(A2=160850,"TP",....