conditionally update cell references from 2nd worksheet

JulioFuentes

New Member
Joined
Jul 6, 2011
Messages
3
Hello. My Excel expert is away unexpectedly and my new boss needs something done right away (nice). I could really use some help! I hope this is clear.

Thank you!

Using Excel 2003. I would provide the 'real' workbook, but do not see how to attach a file in this posting. The problem is probably not that hard, but there is a lot of text here only to help make it clear.

The book has two sheets.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p>
In the Salaries and Benefits sheet Columns A and B refer to the other sheet named 'GEA Sal Sch'
EX: from Salaries and Benefits
A5 ='GEA Sal Sch'!$B$77 (displays the value 10.0)<o:p></o:p>
B5 ='GEA Sal Sch'!$E$77 (displays the value 68,887)<o:p></o:p>
<o:p> </o:p>
NOTE:<o:p></o:p>
1) Salaries and Benefits! Column A always references Column B in GEA Sal Sch!, but the Row referenced will differ.<o:p></o:p>
2) Each Row in Salaries and Benefits! Columns A and B always reference the Same Row in GEA Sal Sch!<o:p></o:p>
<o:p> </o:p>
***Here is the logic I need help incorporating:***<o:p></o:p>
<o:p> </o:p>
IF the value in Salaries and Benefits! column A = 10, then Salaries and Benefits! A and B remain unchanged - keep the same references<o:p></o:p>
EX: Since A5 = 10.0, then Salaries and Benefits! Row 5: A5 will remain ='GEA Sal Sch'!$B$77<o:p></o:p>
B5 ='GEA Sal Sch'!$E$77. No action taken.<o:p></o:p>
<o:p> </o:p>
IF the value in Salaries and Benefits! column A = 9.5, then Salaries and Benefits! A and B reference row increments by 1.<o:p></o:p>
EX: Since A6 = 9.5, then Salaries and Benefits! A6 must increment one ROW from ='GEA Sal Sch'!$B$76 TO ='GEA Sal Sch'!$B$77.<o:p></o:p>
AND Salaries and Benefits! B6 must increment one ROW from ='GEA Sal Sch'!$E$76 TO ='GEA Sal Sch'!$E$77.<o:p></o:p>
<o:p> </o:p>
ELSE<o:p></o:p>
Salaries and Benefits! A and B reference row increments by 2.<o:p></o:p>
EX: Since A7 = 6.0, then Salaries and Benefits! A7 must increment one ROW from ='GEA Sal Sch'!$B$69 TO ='GEA Sal Sch'!$B$71.<o:p></o:p>
AND Salaries and Benefits! B7 must increment one ROW from ='GEA Sal Sch'!$F$69 TO ='GEA Sal Sch'!$F$71.<o:p></o:p>
<o:p> </o:p>
<o:p>*** </o:p>
I have programming experince, but no VBA and not much Excel. I know how to write OFFSET and INDEX functions, but I do not know if they are useful for what I need to do, nor do I know if an Excel IF statement can use functions in place of the
value_if_true, value_if_false

I am wide open to suggestions, but I want to avoid making the end-user copy/paste any function, etc. unless it is very simple for them. I am hoping to automate the logic and cell updates as much as possible.<o:p></o:p>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
UPDATE - simpler logic, but I still need some advice, please.

I can simplify all of this by changing the Salaries and Benefits! sheet to replace all the cell references in column A with the values – that should help. The OFFSET statements shown below work.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p> </o:p>
***However, I do not know how to incorporate them while retaining the different cell references in column B.***

UPDATED LOGIC
Here is an updated, simpler IF THEN. I substitute the row numbers with # and give example cells to help. The goal is to do this:

IF
A# < = 9.0 then increment A# + 2, and increment the ROW reference in B# + 2
EX: A7 < = 9.0 is True then A7 = A7 + 2. B7 =OFFSET('GEA Sal Sch'!$B$69,2,0)

IF
A# = 9.5 then increment A# + 1, and increment the ROW reference in B# + 1
EX: A6 = 9.5 is True then A6 = A6 + 1. B6 =OFFSET('GEA Sal Sch'!$E$77,1,0)

Thank you very much for any advice you can offer!
 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,331
Members
452,907
Latest member
Roland Deschain

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
Back
Top