Dear Community,
I would like assistance to resort a series of logistic regressions tables that include (1) the variable name; (2) the standard error; (3) EXP(B); and (4) a starred version of significance level.
I have a series of tables one after the other in a single sheet, which use the following format:
[TABLE="width: 350"]
<tbody>[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.137)[/TD]
[TD]1.044[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.141)[/TD]
[TD].936[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD](.150)[/TD]
[TD]1.427[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.197)[/TD]
[TD].195[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.194)[/TD]
[TD]1.522[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.088)[/TD]
[TD].897[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD](.078)[/TD]
[TD].787[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.187)[/TD]
[TD].200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.195)[/TD]
[TD]1.518[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.092)[/TD]
[TD].917[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD](.079)[/TD]
[TD].779[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD](.100)[/TD]
[TD].898[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.191)[/TD]
[TD].215[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to find a simple method to reformat these tables into a single table (variables, then EXP(B), then significance, and standard errors below EXP(B)) as follows:
[TABLE="width: 356"]
<tbody>[TR]
[TD]Var[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD]1.044[/TD]
[TD][/TD]
[TD]1.522[/TD]
[TD]*[/TD]
[TD]1.518[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.137)[/TD]
[TD][/TD]
[TD](.194)[/TD]
[TD][/TD]
[TD](.195)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD].936[/TD]
[TD][/TD]
[TD].897[/TD]
[TD][/TD]
[TD].917[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.141)[/TD]
[TD][/TD]
[TD](.088)[/TD]
[TD][/TD]
[TD](.092)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD]1.427[/TD]
[TD]*[/TD]
[TD]--[/TD]
[TD][/TD]
[TD].779[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.150)[/TD]
[TD][/TD]
[TD]--[/TD]
[TD][/TD]
[TD](.079)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD]--[/TD]
[TD][/TD]
[TD].787[/TD]
[TD]**[/TD]
[TD].898[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]--[/TD]
[TD][/TD]
[TD](.078)[/TD]
[TD][/TD]
[TD](.100)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD].195[/TD]
[TD][/TD]
[TD].200[/TD]
[TD][/TD]
[TD].215[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.197)[/TD]
[TD][/TD]
[TD](.187)[/TD]
[TD][/TD]
[TD](.191)[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I can't seem to get my offset coding and logic correct for this, and would really appreciate it if someone could help me out. Any tips to keep the cell formatting using the offset command would be very helpful as well.
One caveat: There are a varied number of tables, and variables are not always ordered similarly. The final table always contains the correct variable order and full model, though. Therefore, I need for the structure of the model to be derived from the last model in the set. MickG helped me with a simpler version of this table previously: https://www.mrexcel.com/forum/excel...st-sorting-based-last-several-rows-sheet.html .
Thanks in advance to anyone who can help me out!
I would like assistance to resort a series of logistic regressions tables that include (1) the variable name; (2) the standard error; (3) EXP(B); and (4) a starred version of significance level.
I have a series of tables one after the other in a single sheet, which use the following format:
[TABLE="width: 350"]
<tbody>[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.137)[/TD]
[TD]1.044[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.141)[/TD]
[TD].936[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD](.150)[/TD]
[TD]1.427[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.197)[/TD]
[TD].195[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.194)[/TD]
[TD]1.522[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.088)[/TD]
[TD].897[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD](.078)[/TD]
[TD].787[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.187)[/TD]
[TD].200[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Var[/TD]
[TD]S.E.[/TD]
[TD]Exp(B)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD](.195)[/TD]
[TD]1.518[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD](.092)[/TD]
[TD].917[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD](.079)[/TD]
[TD].779[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD](.100)[/TD]
[TD].898[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD](.191)[/TD]
[TD].215[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I would like to find a simple method to reformat these tables into a single table (variables, then EXP(B), then significance, and standard errors below EXP(B)) as follows:
[TABLE="width: 356"]
<tbody>[TR]
[TD]Var[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD="align: right"]3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD]1.044[/TD]
[TD][/TD]
[TD]1.522[/TD]
[TD]*[/TD]
[TD]1.518[/TD]
[TD]*[/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.137)[/TD]
[TD][/TD]
[TD](.194)[/TD]
[TD][/TD]
[TD](.195)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD].936[/TD]
[TD][/TD]
[TD].897[/TD]
[TD][/TD]
[TD].917[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.141)[/TD]
[TD][/TD]
[TD](.088)[/TD]
[TD][/TD]
[TD](.092)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]green[/TD]
[TD]1.427[/TD]
[TD]*[/TD]
[TD]--[/TD]
[TD][/TD]
[TD].779[/TD]
[TD]**[/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.150)[/TD]
[TD][/TD]
[TD]--[/TD]
[TD][/TD]
[TD](.079)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]black[/TD]
[TD]--[/TD]
[TD][/TD]
[TD].787[/TD]
[TD]**[/TD]
[TD].898[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]--[/TD]
[TD][/TD]
[TD](.078)[/TD]
[TD][/TD]
[TD](.100)[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Constant[/TD]
[TD].195[/TD]
[TD][/TD]
[TD].200[/TD]
[TD][/TD]
[TD].215[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD](.197)[/TD]
[TD][/TD]
[TD](.187)[/TD]
[TD][/TD]
[TD](.191)[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I can't seem to get my offset coding and logic correct for this, and would really appreciate it if someone could help me out. Any tips to keep the cell formatting using the offset command would be very helpful as well.
One caveat: There are a varied number of tables, and variables are not always ordered similarly. The final table always contains the correct variable order and full model, though. Therefore, I need for the structure of the model to be derived from the last model in the set. MickG helped me with a simpler version of this table previously: https://www.mrexcel.com/forum/excel...st-sorting-based-last-several-rows-sheet.html .
Thanks in advance to anyone who can help me out!