Is it possible to identify a cell and use its co-ordinates?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

Is it possible to have a formula that will check all the cells at left in the row, find the first cell that is not zero, and use its co-ordinates (eg A12) ?

Thanks!
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
ABCDEFGHIJ
100000123F1

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet7

Array Formulas
CellFormula
J1{=ADDRESS(ROW(),MIN(IF(A1:H1<>0,COLUMN(A1:H1))),4)}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



The question is, why do you want the cell address? If it's for inclusion in another formula, there's usually a better way to do it.
 
Upvote 0
The question is, why do you want the cell address? If it's for inclusion in another formula, there's usually a better way to do it.

Yes, I want to include it in a formula. Basically, I have one row with zeros and numbers which I want to identify the most left cell with non zero value.
Then, in the row below, I want to do some other calculations and use the sum of the above identified cell and all the cells to the right up to a specific fixed cell.

Any idea?
 
Upvote 0
Well, if you can show what calculations you want to do, I might come up with something. One thought, if the start of the row is all zeros, you can certainly sum up the whole row with SUM(A1:J1), you don't need to skip the 0 cells.
 
Upvote 0
Well, if you can show what calculations you want to do, I might come up with something. One thought, if the start of the row is all zeros, you can certainly sum up the whole row with SUM(A1:J1), you don't need to skip the 0 cells.

I have these two rows:

29-09-18 30-09-18 01-10-18 02-10-18 03-10-18 04-10-18
52 62 14 52 63 73

In the third row, I want a function that will compare the date in the first row and the same column, with another date in an independent cell.

If the independent date is before then fill with zero. If it is after, then I want to do this:

1) calculate the sum of the second row for the range of the cell that belongs to the column that the third row cell is the first non zero, up to the end of the second row.
2) I want then to drag that formula for all the cells in the third row, so that for each cell, it will check the date two cells above with the independent date and fill accordingly. But if the independent date is after, I want to fill with the same sum every time, which is the sum of the second row cells from the column that the third row is the first non zero, up to the end of the second row.

In fact, I want to use that sum to do some more calculations, but I can figure that out later.

Any idea? The tricky thing is how to make the formula in the third row, to scan the left cells, identify the one with the first non zero value and use that reference so that it will calculate the relevant sum in the second row.

It's so tricky! I might have to use an additional line, but if you can come up with a better idea? I am not aware of all the functions in Excel so I don't know the capabilities and limitations.
 
Upvote 0
I'm still a bit confused. Could you show what the result should be for the example above, and say what your independent date is?
 
Upvote 0
It's simple, it looks like the below.

26-09-18 27-09-18 28-09-18 29-09-18 30-09-18 01-10-18 02-10-18 03-10-18
5 2 6 3 7 4 5 2
0 0 0 21 21 21 21 21


The bottom row, should contain a formula that checks the top cell of the column if it is past or after the current date. If past, fills with zero. If after, it fills with the sum of the middle line that starts from the current date up to the end of the row.
 
Upvote 0
Something like this?

Excel 2012
ABCDEFGHI
19/26/20189/27/20189/28/20189/29/20189/30/201810/1/201810/2/201810/3/2018
252637452
3000018181818

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B3=IF(A3<>0,A3,IF(B1< TODAY(),0,SUM(B2:$I2)))

<tbody>
</tbody>

<tbody>
</tbody>



Put the formula in B3 and drag to the right. I left an empty column in A for simplicity, but we can change that. The results are different from your example since we've moved a day ahead.
 
Last edited:
Upvote 0
Something like this?

Excel 2012
ABCDEFGHI
19/26/20189/27/20189/28/20189/29/20189/30/201810/1/201810/2/201810/3/2018
252637452
3000018181818

<tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
B3=IF(A3<>0,A3,IF(B1< TODAY(),0,SUM(B2:$I2)))

<tbody>
</tbody>

<tbody>
</tbody>



Put the formula in B3 and drag to the right. I left an empty column in A for simplicity, but we can change that. The results are different from your example since we've moved a day ahead.

Thanks

Can you explain what that does?
The first bit checks the left cell and if it is non zero, it fills it with the same value. That's not something that I want. I want to fill with zero or non zero, based on the top date in respect to the current date.

Your formula then checks for the date and it sums B2:I2.
I am not sure what this sum is.

Any explanation please?
 
Upvote 0
Also, can you make it, when the date is today or after, to calculate the percentage of the two cells above value to the specified sum, ie the sum of the second row values, from the first cell that the below cell is non zero up to the end of the row.

thanks!
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top