ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   how to select a column from a cell after find (https://www.excelbanter.com/excel-programming/441229-how-select-column-cell-after-find.html)

GS

how to select a column from a cell after find
 
I am trying to set up the default format for date a column once I found the
cell with the heading from C#

oRng = oSheet.UsedRange;
Excel.Range oR = oRng.Find("Date", omissing,
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, false,
omissing, omissing);

I'm now atloos as to how to get column selected or apply format to a col.
string s = oR.ToString();

i was searching tje ms sites w/o sucesss.

can someone give a hint?
thx

p45cal[_240_]

how to select a column from a cell after find
 

GS;687486 Wrote:

I am trying to set up the default format for date a column once I found
the
cell with the heading from C#

oRng = oSheet.UsedRange;
Excel.Range oR = oRng.Find("Date", omissing,
Excel.XlFindLookIn.xlValues, Excel.XlLookAt.xlPart,
Excel.XlSearchOrder.xlByRows, Excel.XlSearchDirection.xlNext, false,
omissing, omissing);

I'm now atloos as to how to get column selected or apply format to a

col.
string s = oR.ToString();

i was searching tje ms sites w/o sucesss.

can someone give a hint?
thx



perhaps:
intersect(oRng,oR.entirecolumn).select
or:
intersect(oRng,oR.entirecolumn).NumberFormat = "dddd, mmmm dd, yyyy"
?


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=192142

http://www.thecodecage.com/forumz



All times are GMT +1. The time now is 12:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com