Home > Software engineering >  Incrementing numerical values in excel formula
Incrementing numerical values in excel formula

Time:08-07

Hello I would love some help with this problem I am having an issue in Excel I am trying to pull fill a formula that I have written to advance the value of the cells being counted. What my formula does is check each cell to see if the letter p is in the cell, and if so it counts up for every cell that it searches and outputs the total in the cell the formula is in, pretty simple.

This is the pattern for the formula that I have created.

=SUM(COUNTIF(INDIRECT({"K1","N1","Q1","T1","W1","Z1","AC1","AF1"}),"*p*"))
=SUM(COUNTIF(INDIRECT({"K2","N2","Q2","T2","W2","Z2","AC2","AF2"}),"*p*"))
=SUM(COUNTIF(INDIRECT({"K3","N3","Q3","T3","W3","Z3","AC3","AF3"}),"*p*"))

For some reason this will not AutoFill when I pull down the cell.

I have thought about perhaps writing a python script to increment the values but am not that familiar with how to do this within Python.

Does anyone here have an idea in how I could achieve the repeated formula without having to manually type it in each cell? I am trying to normalize a "Database" and this is the only way that I am able to normalize level 3.

Thank you in advance.

CodePudding user response:

Countif requires the first argent to be a range, therefore it errors. The following function does work: =SUMPRODUCT(N(ISNUMBER(SEARCH("p",CHOOSE({1,2,3,4,5,6,7,8},K1,N1,Q1,T1,W1,Z1,AC1,AF1)))))

CodePudding user response:

A bit hard to follow without seeing a few example values of k1 n1 etc but it might be worth adding in the address formula =ADDRESS()

  • Related