Shortening an equation Help

radar_jynx

New Member
Joined
Mar 16, 2009
Messages
18
Hi i was wondering if its possible turn this equation into an array or some kind of simpler form.

t = Time()

If [F92,E93] = "" Then
[F92,E93] = Str(t)
ElseIf [F93] = "" Then
[G92,F93] = Str(t)
ElseIf [G93] = "" Then
[H92,G93] = Str(t)
ElseIf [H93] = "" Then
[I92,H93] = Str(t)
ElseIf [I93] = "" Then
[J92,I93] = Str(t)
ElseIf [J93] = "" Then
[J93] = Str(t)
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

radar_jynx

New Member
Joined
Mar 16, 2009
Messages
18
Sorry about that i wont do it again.

yeah "" is testing for null

and your rite i only need

if [E93] = "" then

for the first line , but is there a way i can make the letters incline in 3 particular ranges.
 
Upvote 0

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You can use the Cells property in a loop like this:

Code:
For c = 5 to 10
    With Cells(93, c)
        If .Value = "" Then .Value = Str(t)
        Exit For
    End With
Next c

That fills the first blank cell and stops.
 
Upvote 0

Forum statistics

Threads
1,191,482
Messages
5,986,838
Members
440,052
Latest member
silverandcoldmc

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top