Skip i'r prif gynnwys

Sut i ychwanegu gwerthoedd at gelloedd lluosog yn Excel?

Os ydych chi am ychwanegu gwerth at gelloedd lluosog yn Excel, bydd y dulliau canlynol yn eich helpu i'w brosesu'n hawdd ac yn gyflym:


swigen dde glas saeth Ychwanegu Gwerth i gelloedd lluosog gyda VBA

Gall defnyddio macros hwyluso llawer o brosesu dro ar ôl tro, a gwneud ein gwaith yn haws ac yn gyflymach. Felly hefyd y macro canlynol.

Cam 1: Dewiswch y celloedd y byddwch chi'n ychwanegu gwerth atynt.

Cam 2: Dalwch i lawr y ALT + F11 allweddi, ac mae'n agor ffenestr Microsoft Visual Basic for Applications.

Cam 3: Cliciwch Mewnosod > Modiwlau, a gludwch y VBA canlynol yn y Ffenestr Modiwl.

Is-Add2Formula ()
'Ychwanegwch 300

Ar gyfer pob c Yn Dethol
c.Gweithgarwch
ActiveCell.FormulaR1C1 = "=" & ActiveCell.Formula & "+300"
Nesaf c

Is-End

Cam 4: Pwyswch y F5 allwedd i redeg y macro hwn.

Nodiadau:

1. Mae'r macro hwn yn ddilys yn unig ar gyfer celloedd nad ydynt yn cynnwys fformiwlâu ynddynt.

2. Bydd y macro hwn yn ychwanegu 300 i bob cell a ddewiswyd. Os ydych chi am ychwanegu gwerth arall, amnewidiwch y 300 gyda gwerth arall.


swigen dde glas saeth Ychwanegu gwerth i gelloedd lluosog gyda Kutools ar gyfer Excel

Kutools ar gyfer Excel yn darparu dull amgen hawdd ei ddefnyddio inni, a gall ei Offer Gweithredol ein helpu i ychwanegu gwerth at gelloedd lluosog yn hawdd.

Kutools ar gyfer Excel yn cynnwys mwy na 80 o offer Excel defnyddiol. Am ddim i geisio heb unrhyw gyfyngiad mewn 30 diwrnod. Ei gael Nawr.

Cam 1: Dewiswch y celloedd y byddwch chi'n ychwanegu'r un gwerth atynt.

Cam 2: Cliciwch y Kutools > Ymgyrch > Offer Gweithredu…. Gweler y screenshot:

Cam 3: Dewiswch y Ychwanegu o'r adran Operation, a nodwch y gwerth y byddwch chi'n ei ychwanegu at gelloedd dethol. Gweler y screenshot:

Cam 4: Gwiriwch y Creu fformwlâu opsiwn.

Cam 5: Cliciwch OK.

Yn Operation Tools,
dewis Ychwanegiad, nodwch 300, a chliciwch ar OK.

Kutools ar gyfer Excel's Offer Gweithredu yn cefnogi pob math o weithrediad mathemategol i'r holl gelloedd a ddewiswyd gyda'i gilydd:

  • Ychwanegiad: Ynghyd ag opera penodedig.
  • Tynnu: Tynnwch operand penodedig.
  • Lluosi: Pob gwerth celloedd wedi'i luosi â'r operand.
  • Rhaniad: Pob gwerth celloedd wedi'i rannu â'r operand.
  • Esboniad: Mae pob gwerth o bŵer cell yr operand.
  • Talgrynnu: Talgrynnu pob gwerth cell i'r rhifau degol (operand penodedig).
  • Swyddogaeth: Yn cymhwyso swyddogaeth i bob gwerth cell.
  • Custom: Creu mynegiad tebyg i fformiwla a'i gymhwyso i bob gwerth cell.

Erthygl Cysylltiedig

Offer Cynhyrchiant Swyddfa Gorau

🤖 Kutools AI Aide: Chwyldro dadansoddi data yn seiliedig ar: Cyflawniad Deallus   |  Cynhyrchu Cod  |  Creu Fformiwlâu Personol  |  Dadansoddi Data a Chynhyrchu Siartiau  |  Invoke Swyddogaethau Kutools...
Nodweddion Poblogaidd: Darganfod, Amlygu neu Adnabod Dyblygiadau   |  Dileu Rhesi Gwag   |  Cyfuno Colofnau neu Gelloedd heb Colli Data   |   Rownd heb Fformiwla ...
Super-edrych: VLookup Meini Prawf Lluosog    VLookup Gwerth Lluosog  |   VLookup Ar Draws Taflenni Lluosog   |   Edrych Niwlog ....
Rhestr gwympo Uwch: Creu Rhestr Gollwng yn Gyflym   |  Rhestr Gollwng Dibynnol   |  Rhestr Gollwng Aml-ddewis ....
Rheolwr Colofn: Ychwanegu Nifer Penodol o Golofnau  |  Symud Colofnau  |  Toglo Statws Gwelededd Colofnau Cudd  |  Cymharwch Ystodau a Cholofnau ...
Nodweddion dan Sylw: Ffocws ar y Grid   |  Golwg Dylunio   |   Bar Fformiwla Mawr    Rheolwr Llyfr Gwaith a Thaflen   |  Llyfrgell Adnoddau (Testun Auto)   |  Dewiswr Dyddiad   |  Cyfuno Taflenni Gwaith   |  Amgryptio/Dadgryptio Celloedd    Anfon E-byst trwy Restr   |  Hidlo Super   |   Hidlo Arbennig (hidlo mewn print trwm/italig/strikethrough...) ...
15 Set Offer Gorau12 Testun offer (Ychwanegu Testun, Dileu Cymeriadau,...)   |   50 + Siart Mathau (Siart Gantt,...)   |   40+ Ymarferol Fformiwlâu (Cyfrifwch oedran yn seiliedig ar ben-blwydd,...)   |   19 mewnosod offer (Mewnosod Cod QR, Mewnosod Llun o'r Llwybr,...)   |   12 Trosi offer (Rhifau i Eiriau, Trosi arian cyfred,...)   |   7 Uno a Hollti offer (Rhesi Cyfuno Uwch, Celloedd Hollt,...)   |   ... a mwy

Supercharge Eich Sgiliau Excel gyda Kutools ar gyfer Excel, a Phrofiad Effeithlonrwydd Fel Erioed Erioed. Kutools ar gyfer Excel Yn Cynnig Dros 300 o Nodweddion Uwch i Hybu Cynhyrchiant ac Arbed Amser.  Cliciwch Yma i Gael Y Nodwedd Sydd Ei Angen Y Mwyaf...

Disgrifiad


Mae Office Tab yn dod â rhyngwyneb Tabbed i Office, ac yn Gwneud Eich Gwaith yn Haws o lawer

  • Galluogi golygu a darllen tabbed yn Word, Excel, PowerPoint, Cyhoeddwr, Mynediad, Visio a Phrosiect.
  • Agor a chreu dogfennau lluosog mewn tabiau newydd o'r un ffenestr, yn hytrach nag mewn ffenestri newydd.
  • Yn cynyddu eich cynhyrchiant 50%, ac yn lleihau cannoedd o gliciau llygoden i chi bob dydd!

Comments (9)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Thanks a lot. It is working 💖
This comment was minimized by the moderator on the site
If you want to include cells with formula, you could try, which is only a slight modification from the original. But adding numbers to an established formula could be dangerous so beware:


Sub Add2Formula()
' Add a number
Dim formulae As String
Dim a_number As Double

a_number = InputBox("what number to increment")

For Each cell In Selection
cell.Activate
formulae = ActiveCell.Formula
' gets rid of formula non-essentials that could cause errors
formulae = Replace(formulae, "'", "")
formulae = Replace(formulae, "=", "")

If formulae = "" Then
ActiveCell.Formula = "= " & ActiveCell.Formula & "+" & a_number
Else
ActiveCell.Formula = "= " & formulae & "+" & a_number
End If
Next cell

End Sub


This could be easily modified to skip blank cells, and to skip text cells you could probably evaluate the value of the cell, and when it errors you could go to the next cell. Hope this helps.
This comment was minimized by the moderator on the site
How can I get this VBA formula to skip blank and text cells? Thanks
This comment was minimized by the moderator on the site
sir.iam doing survey list in excel if a=200,b=100,c=50,d=15.e=10 for 3 questions if he selects a,b,b means 200+100+100=400 and Description should be good ..how to do this one
This comment was minimized by the moderator on the site
this tool is so useful and can trust the product.
This comment was minimized by the moderator on the site
any reply? will this site answer our enquiry?
This comment was minimized by the moderator on the site
Dear Expert Have a question here. How to increase age automatically for each year? Thanks
This comment was minimized by the moderator on the site
Add Value to multiple cells with VBA's techque is very useful Thanks
This comment was minimized by the moderator on the site
sir if a1=100 b1=100 and after dat we want to insert 100 again in a1 den b1 should automatically update to 200 means a1 value added in b1 and so on and on. how it is possibe we have to take the two cells only. sir plz solve dis problem
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations