sumif contains questions

1buckeyefan

New Member
Joined
Mar 27, 2018
Messages
2
Greetings,
I have a question and could use some help with an excel function.

Here is what I'm trying to do. If column A contains '*001' then B=A otherwise B=A1+1

A B
1 1980001 1980001
2 1980002 1980002
3 1980003 1980003
4 1987001 1987001
5 1987002 1987002


I just can't seem to figure this one out.

Thanks!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Book1
AB
119800011980001
219800021980003
319800031980004
419870011987001
519870021987003
Sheet1
Cell Formulas
RangeFormula
B1=IF(MOD($A1,1000)=1,$A1,$A1+1)


WBD
 
Upvote 0
1980001 1980001
2 1980002 1980002
3 1980003 1980003
4 1987001 1987001
5 1987002 1987002
col A
19800011980001#####row 9
19800021980002
19800031980002
19870011980001
19870021980002
#####
=IF(RIGHT(TEXT(A9,"0000000"),3)="001", $A$9,$A$9+1)

<colgroup><col><col span="6"></colgroup><tbody>
</tbody>
 
Upvote 0
Thanks for the quick response! I should have given a bit more detail. The formula will need to be applied to every cell in Column B. So for your example, MOD($A1,1000) does = 1 but for the rest of values, this would not work. So if the MOD does not equal 1 can I just add 1 to the number in column A for the value of Column B?
 
Upvote 0
Thanks for the quick response! I should have given a bit more detail. The formula will need to be applied to every cell in Column B. So for your example, MOD($A1,1000) does = 1 but for the rest of values, this would not work. So if the MOD does not equal 1 can I just add 1 to the number in column A for the value of Column B?

That's what my formula does if you copy it down. Did you try it? Did you look at my example output? Is that not what you want?

WBD
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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