|
-
Aug 18th, 2008, 09:38 AM
#1
Thread Starter
Member
[RESOLVED] Automaticle calculate cell´s depending of another cell´s value
Hello, People i´m not getting it...
i need to calculate the value o a cell in function of other cell value for example:
if cell("A1").value = 1 then cell("A2").value = cell("A1").value + 1
and also i need to run all cells in that row
can anyone pleazz help?
thankx
-
Aug 18th, 2008, 10:03 AM
#2
Re: Automaticle calculate cell´s depending of another cell´s value
-
Aug 18th, 2008, 10:11 AM
#3
Re: Automaticle calculate cell´s depending of another cell´s value
Change this
cell("A1").value = 1 then cell("A2").value = cell("A1").value + 1
to
Code:
'Change Sheet1 below to the name of the relevant sheet
If Sheets("Sheet1").Range("A1").Value = 1 Then
Sheets("Sheet1").Range("A2").Value = Sheets("Sheet1").Range("A1").Value + 1
End If
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 18th, 2008, 10:33 AM
#4
Thread Starter
Member
Re: Automaticle calculate cell´s depending of another cell´s value
OK , koolsid it worked fine for what i need thanks. now how do i , run it for the following rows ? (witch a cicle i think) I'm on A1 ,and i need to do it till the A300 for example.
-
Aug 18th, 2008, 12:35 PM
#5
Re: Automaticle calculate cell´s depending of another cell´s value
Here is an example
vb Code:
Option Explicit
Sub test()
Dim i As Integer
'Change 300 to the respective row number
For i = 1 To 300
'i will increment each time the for loop is
'executed for 300 times
If Sheets("Sheet1").Range("A" & i).Value = 1 Then
'your code
End If
Next i
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 19th, 2008, 04:52 AM
#6
Thread Starter
Member
Re: Automaticle calculate cell´s depending of another cell´s value
Koolsid, it work´s perfectly 
Thankx man
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|