A cellular function that is shared between carbohydrates and lipids is energy production.
Carbohydrates like glucose will be oxidized to pyruvic acid in glycolysis which gets transported to mitochondria where it gets converted to acetyl co-a. Acetyl co-a then enters Kreb's cycle in which Nadh and Fadh molecules are formed these molecules are oxidized in the electron transport chain to form ATP which is an energy currency of a cell. Lipids are oxidized through the beta-oxidation pathway to form acetyl co-a which enters the Krebs cycle to form Nadh and Fadh molecules which are oxidized in the electron transport chain to form ATP. This explains how carbohydrates and lipids share the same function which is energy production.