Calculation based on existing column, don't know range

RoccoM

New Member
Joined
Apr 22, 2019
Messages
19
Need help with the following:
I have a height and width column in pixel count. I convert the pixels to inches without a problem.
How do I figure out the last row in the column. They amount of rows will change every time I pull my data. In other words, how can I create my calculation for each row, when I do not know how many rows my data will contain?

ABCD
1Height in PixelsWidth in PixelsHeight in InchesWidth in Inches
2400200=a2/40*1.75=b2/40*175

<tbody>
</tbody>

3
4
5
6
etc...

Thanks for the help
Rocco
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
I think if you format it as a table, You can just use the formula to expand the range of the table so if your range keeps changing your formulas will account for it
 
Upvote 0
Yeah, if you convert your range into a table with headers, if you enter the formula into Height in inches and the other one in height to formula, it will automatically calculate what you're trying to do for each row.

<colgroup><col><col><col><col><col span="5"></colgroup><tbody>
Code:
[TR]
[TD]Height in Pixels[/TD]
[TD]Width in Pixels[/TD]
[TD]Height in Inches[/TD]
[TD]Width in Inches[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]400[/TD]
[TD]200[/TD]
[TD]17.5[/TD]
[TD]875[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]200[/TD]
[TD]50[/TD]
[TD]8.75[/TD]
[TD]218.75[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]600[/TD]
[TD]300[/TD]
[TD]26.25[/TD]
[TD]1312.5[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]600[/TD]
[TD]200[/TD]
[TD]26.25[/TD]
[TD]875[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>
 
Upvote 0
Thanks for the reply. It's a great option. I got impatient. Before I saw the responses to my post, I just put in code to count the rows in column A. (never blank rows in the data). Then I stored the result in a variable. Using the range command, I can successfully enter the range (variable). I got this from another post in this forum.

Thanks for the help! I will try to format as a table also. I like this idea!
Rocco
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,590
Members
449,039
Latest member
Arbind kumar

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