Calculation based on existing column, don't know range

RoccoM

New Member
Joined
Apr 22, 2019
Messages
14
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
 

jondavis1987

Active Member
Joined
Dec 31, 2015
Messages
302
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
 

jondavis1987

Active Member
Joined
Dec 31, 2015
Messages
302
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>
 

RoccoM

New Member
Joined
Apr 22, 2019
Messages
14
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
 

Forum statistics

Threads
1,082,333
Messages
5,364,675
Members
400,810
Latest member
elbashka

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top