excel - Performing math on table columns -
excel - Performing math on table columns -
i tasked "optimizing" spreadsheet. have code pulls info csv file, dumps workbook , creates table , performs other stuff data. wondering if there way perform, let's say, simple partition on table while referencing headers.
example:
range("surveystaging[[central bandwidth values]:[bandwidth values]]").value = range("surveystaging[[central bandwidth]:[bandwidth]]").value works fine, however:
range("surveystaging[district]").value = range("surveystaging[central bandwidth]").value/range("surveystaging[school bandwidth]").value throws type mismatch.
any thought on how without having loop through every cell in columns?
thank in advance assistance.
you have adapt rows , columns own code, think work.
it doesn't utilize loop; manipulates whole range @ once.
dim count1 double count1 = 1 while range("a" & cstr(rownumber + count1)).value <> "" doevents count1 = count1 + 1 wend count1 = count1 - 1 'the count takes accurate number of rows manipulate range("b2", "b" & cstr(count1)) = "=(rc[-1]/rc[-3])" ' have set in whatever columns you'll dividing number excel excel-vba
Comments
Post a Comment