In the formula get cell value as a row number

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
1,827
Hello,</SPAN></SPAN>

I am using the formula below, which is FD$6:FD$5006 this has end row number 5006 I need it pick the last row number from the cell value of B3 like "FD$6:FD$"&B3 is it can be done
</SPAN></SPAN>

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>FE</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">6</td><td style="font-weight: bold;text-align: center;border-right: 1px solid black;border-left: 1px solid black;color: #FF0000;;">2241</td></tr></tbody></table><p style="width:3,6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">FE6</th><td style="text-align:left">{=IF(<font color="Blue">MAX(<font color="Red">(<font color="Green">FD6=FD$6:FD$5006</font>)*(<font color="Green">ROW(<font color="Purple">FD$6:FD$5006</font>)</font>)</font>)=0,,MAX(<font color="Red">(<font color="Green">FD6=FD$6:FD$5006</font>)*(<font color="Green">ROW(<font color="Purple">FD$6:FD$5006</font>)</font>)</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />

Thank you all
</SPAN></SPAN>

Excel 2000
</SPAN></SPAN>
Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Last edited:

Some videos you may like

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
1,827
I tried to modified using INDIRECT function in the formula to get cell value of B3 but it does not seems to work please need help </SPAN></SPAN>

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #A6AAB6"><colgroup><col width="25px" style="background-color: #E0E0F0" /><col /></colgroup><thead><tr style=" background-color: #E0E0F0;text-align: center;color: #161120"><th></th><th>FB</th></tr></thead><tbody><tr ><td style="color: #161120;text-align: center;">6</td><td style="font-weight: bold;text-align: right;border-top: 1px solid black;border-right: 1px solid black;border-left: 1px solid black;color: #FF0000;;">2242</td></tr></tbody></table><p style="width:3,6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid #A6AAB6;border-top:none;text-align: center;background-color: #E0E0F0;color: #161120">Sheet1</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: #FFFFFF" ><tr><td style="padding:6px" ><b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #A6AAB6"><thead><tr style=" background-color: #E0E0F0;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #E0E0F0;color: #161120">FB6</th><td style="text-align:left">{=$B$3-IF(<font color="Blue">MAX(<font color="Red">(<font color="Green">FD6=INDIRECT(<font color="Purple">"FD$6:FD$"&B3</font>)*(<font color="Purple">ROW(<font color="Teal">INDIRECT(<font color="#FF00FF">"FD$6:FD$"&B3</font>)</font>)</font>)</font>)</font>)=0,,MAX(<font color="Red">(<font color="Green">FD6=INDIRECT(<font color="Purple">"FD$6:FD$"&B3</font>)*(<font color="Purple">ROW(<font color="Teal">INDIRECT(<font color="#FF00FF">"FD$6:FD$"&B3</font>)</font>)</font>)</font>)</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.
<b>Note: Do not try and enter the {} manually yourself</b></td></tr></table><br />

Regards,
</SPAN></SPAN>
Moti
</SPAN></SPAN>
 
Last edited:

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
1,827
Bump...If formula is not workable may be VBA solution please </SPAN></SPAN>
 
Last edited:

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,682
Office Version
  1. 365
Platform
  1. Windows
Maybe
=IF(MAX((FD6=INDIRECT("FD$6:FD$"&B3))*(ROW(INDIRECT("FD$6:FD$"&B3))))=0,,MAX((FD6=INDIRECT("FD$6:FD$"&B3))*(ROW(INDIRECT("FD$6:FD$"&B3)))))
 
Solution

motilulla

Well-known Member
Joined
Feb 13, 2008
Messages
1,827
Maybe
=IF(MAX((FD6=INDIRECT("FD$6:FD$"&B3))*(ROW(INDIRECT("FD$6:FD$"&B3))))=0,,MAX((FD6=INDIRECT("FD$6:FD$"&B3))*(ROW(INDIRECT("FD$6:FD$"&B3)))))
Brilliant Fluff, Your formula has solved my problem. It worked fine. Thank you very much for your help</SPAN></SPAN>

Kind Regards,
</SPAN></SPAN>
Moti :)
</SPAN></SPAN>
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,682
Office Version
  1. 365
Platform
  1. Windows
You're welcome & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,127,859
Messages
5,627,290
Members
416,236
Latest member
Lynchbox

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
Top