Quiet@Remove["Global`*"];
$HistoryLength=2;
SetDirectory[NotebookDirectory[]];

data=Import["data.xls"][[1]];
pl1=ListPlot[data/.{f_,R_,X_}:>{R,X},PlotStyle->{Red,PointSize[0.015]}];

data;

Rtry=100;
Ctry=5*(10^(-6));
Z[f_]:=((Rtry*(1/(I*2*Pi*f*Ctry)))/(Rtry+(1/(I*2*Pi*f*Ctry))))//N;
nfrekvenci=100;
fmin=100;
fmax=100000;
q=qq/.FindRoot[fmin*(qq^(nfrekvenci-1))==fmax,{qq,1.1}];
frekvence=fmin*(q^(#-1))&/@Range[nfrekvenci];
(*Table[fmin*(q^(i-1)),{i,1,nfrekvenci}]*)

body={#,Re[Z[#]],Im[Z[#]]}&/@frekvence;
Zobecne[f_]:=((R*(1/(I*2*Pi*f*c)))/(R+(1/(I*2*Pi*f*c))));
odchylka[{f_,R_,X_}]:=Abs[R+I*X-Zobecne[f]];
proFindMin=Plus@@(odchylka/@body);
FindMinimum[proFindMin,{R,10},{c,(10^(-6))},Method->"PrincipalAxis"]

proFindMin=Plus@@(odchylka/@data);
sol=FindMinimum[proFindMin,{R,10},{c,(10^(-6))},Method->"PrincipalAxis"][[2]]
pl2=ParametricPlot[{Re[Zobecne[f]/.sol],Im[Zobecne[f]/.sol]},{f,0,100000},PlotRange->All];
Show[pl1,pl2]

f=50;
T=(1/f);
uz[t_]:=10*Sin[2.Pi*f*t+0.263]+2.5*Sin[2.Pi*3*f*t-0.456];
Plot[uz[t],{t,0,2T}];
proud[t_]:=((uz[t])/Rtry)+Ctry*uz'[t];
(*Timing[Plot[proud[t],{t,0,2T},PlotPoints->5000]];
*)
ndat=100;
dataOscilo={#,uz[#],proud[#]}&/@Range[0,T,(T/(ndat-1.))];
intu=Interpolation[dataOscilo/.{t_,u_,i_}:>{t,u}];
inti=Interpolation[dataOscilo/.{t_,u_,i_}:>{t,i}];
dataProFit={intu[#],intu'[#],inti[#]}&/@Range[0,T,(T/(ndat-1.))];
Fit[dataProFit,{u[t],u'[t]},{u[t],u'[t]}]

RuleDelayed[a,b]