Visual cortical neurons show variability in their responses to repeated presentations of a stimulus and a portion of this variability is shared across neurons. Attention may enhance visual perception by reducing shared spiking variability. However, shared variability and its attentional modulation are not consistent within or across cortical areas, and depend on additional factors such as neuronal type. A critical factor that has not been tested is actual anatomical connectivity. We measured spike count correlations among pairs of simultaneously recorded neurons in the primary visual cortex (V1) for which anatomical connectivity was inferred from spiking cross-correlations. Neurons were recorded in monkeys performing a contrast-change discrimination task requiring covert shifts in visual spatial attention. Accordingly, spike count correlations were compared across trials in which attention was directed toward or away from the visual stimulus overlapping recorded neuronal receptive fields. Consistent with prior findings, attention did not significantly alter spike count correlations among random pairings of unconnected V1 neurons. However, V1 neurons connected via excitatory synapses showed a significant reduction in spike count correlations with attention. Interestingly, V1 neurons connected via inhibitory synapses demonstrated high spike count correlations overall that were not modulated by attention. Correlated variability in excitatory circuits also depended upon neuronal tuning for contrast, the task-relevant stimulus feature. These results indicate that shared variability depends on the type of connectivity in neuronal circuits. Also, attention significantly reduces shared variability in excitatory circuits, even when attention effects on randomly sampled neurons within the same area are weak.